Magnetic sensor including a plurality of magnetic detection elements and a plurality of magnetic field generators

ABSTRACT

A magnetic sensor includes a plurality of magnetic detection elements, and a plurality of magnetic field generators associated with the plurality of magnetic detection elements. Each of the plurality of magnetic field generators includes a first ferromagnetic material section and a first antiferromagnetic material section. The first antiferromagnetic material section is in contact with and exchange-coupled to the first ferromagnetic material section. The first ferromagnetic material section has an overall magnetization. The plurality of magnetic field generators includes first and second magnetic field generators configured so that the overall magnetization of the first ferromagnetic material section of the first magnetic field generator is in a different direction from the overall magnetization of the first ferromagnetic material section of the second magnetic field generator.

This is a Continuation of application Ser. No. 15/185,787 filed Jun. 17,2016. The disclosure of the prior application is hereby incorporated byreference herein in its entirety.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention relates to a magnetic field generator including aplurality of magnetic field generation units, and to a magnetic sensorsystem and a magnetic sensor each including the magnetic fieldgenerator.

2. Description of the Related Art

In recent years, magnetic sensor systems have been employed to detect aphysical quantity associated with the rotational movement or linearmovement of a moving object in a variety of applications. U.S. PatentApplication Publication No. 2014/0292322 A1 discloses a magnetic sensorsystem that includes a scale and a magnetic sensor and is configured sothat the magnetic sensor generates a signal associated with the relativepositional relationship between the scale and the magnetic sensor.

The magnetic sensor includes a magnetic detection element for detectinga magnetic field to be detected. Hereinafter, the magnetic field to bedetected will be referred to as the target magnetic field. U.S. PatentApplication Publication No. 2014/0292322 A1 discloses a magnetic sensorthat uses a so-called spin-valve magnetoresistance (MR) element as themagnetic detection element. The spin-valve MR element includes amagnetization pinned layer having a magnetization pinned in a certaindirection, a free layer having a magnetization that varies depending onthe target magnetic field, and a nonmagnetic layer located between themagnetization pinned layer and the free layer. Examples of thespin-valve MR element include a TMR element in which the nonmagneticlayer is a tunnel barrier layer, and a GMR element in which thenonmagnetic layer is a nonmagnetic conductive layer.

The scale of the magnetic sensor system includes a plurality of magneticfield generation units arranged in a predetermined pattern to generate aplurality of external magnetic fields. Typically, each of the pluralityof magnetic field generation units is formed of a permanent magnet. Theplurality of magnetic field generation units are magnetized inalternating directions. This causes the external magnetic fieldsgenerated by the plurality of magnetic field generation units to be inalternating directions.

Some magnetic sensors have means for applying a bias magnetic field tothe magnetic detection element. The bias magnetic field is used to allowthe magnetic detection element to respond linearly to a variation in thestrength of the target magnetic field. In a magnetic sensor that uses aspin-valve MR element, the bias magnetic field is used also to make thefree layer have a single magnetic domain and to orient the magnetizationof the free layer in a certain direction, when there is no targetmagnetic field.

U.S. Patent Application Publication No. 2014/0292322 A1 discloses amagnetic sensor including a bias magnetic field generator for generatinga plurality of bias magnetic fields to be applied to a plurality of MRelements. The bias magnetic field generator includes a plurality ofpairs of magnetic field generation units provided in correspondence withthe plurality of MR elements. Every two magnetic field generation unitspairing up with each other are arranged with a corresponding one of theMR elements in between. Each magnetic field generation unit is formed ofa permanent magnet and generates an external magnetic field.

A structure including a plurality of magnetic field generation unitsarranged in a predetermined pattern to generate a plurality of externalmagnetic fields, such as a scale, will hereinafter be referred to asmagnetic field generator. In a magnetic sensor including a bias magneticfield generator, a plurality of magnetic field generation unitsconstituting the bias magnetic field generator are arranged in apredetermined pattern. Thus, the bias magnetic field generator can alsobe said to be a magnetic field generator.

Magnetic sensor systems and magnetic sensors each including a magneticfield generator that includes a plurality of magnetic field generationunits each formed of a permanent magnet suffer from the followingproblem. Such magnetic sensor systems and magnetic sensors are typicallyused under the condition that the strength of the target magnetic fielddoes not exceed the coercivity of the permanent magnets. However, sincethe magnetic sensor systems and the magnetic sensors can be used invarious environments, an external magnetic field having a strengthexceeding the coercivity of the permanent magnets can happen to betemporarily applied to the permanent magnets. When such an externalmagnetic field is temporarily applied to the permanent magnets, themagnetization direction of the permanent magnets may be changed from anoriginal direction and then remain different from the original directioneven after the external magnetic field disappears. In such a case, thedirection of the magnetic field generated by each magnetic fieldgeneration unit changes to become different from a desired direction.

Further, the magnetic field generator including a plurality of magneticfield generation units each formed of a permanent magnet has a problemin that the plurality of magnetic field generation units are difficultto arrange in a desired pattern. This problem will be described indetail below by taking as an example a magnetic field generator in whichthe plurality of magnetic field generation units are magnetized inalternating directions, such as a scale. The following descriptionassumes that the magnetization directions of the plurality of magneticfield generation units alternate between a first direction and a seconddirection. A plurality of magnetic field generation units magnetized inthe first direction will be referred to as a plurality of first magneticfield generation units. A plurality of magnetic field generation unitsmagnetized in the second direction will be referred to as a plurality ofsecond magnetic field generation units. This magnetic field generator isfabricated by the following method.

First, an initial magnetic field generator including a plurality ofinitial magnetic field generation units that are not magnetized in apredetermined direction is fabricated. Next, a plurality of ones of theinitial magnetic field generation units that are intended to become aplurality of first magnetic field generation units are subjected to amagnetic field in the first direction having a higher strength than thecoercivity of those plurality of ones of the initial magnetic fieldgeneration units, whereby those plurality of ones of the initialmagnetic field generation units are magnetized in the first direction.At this time, the other plurality of ones of the initial magnetic fieldgeneration units that are intended to become a plurality of secondmagnetic field generation units are not subjected to any magnetic fieldhaving a higher strength than the coercivity of those initial magneticfield generation units. The initial magnetic field generation unitsmagnetized in the first direction become the plurality of first magneticfield generation units.

Next, the initial magnetic field generation units intended to become theplurality of second magnetic field generation units are subjected to amagnetic field in the second direction having a higher strength than thecoercivity of those initial magnetic field generation units, wherebythose initial magnetic field generation units are magnetized in thesecond direction. At this time, the plurality of first magnetic fieldgeneration units, which have already been magnetized in the firstdirection, are not subjected to any magnetic field having a higherstrength than the coercivity thereof. The initial magnetic fieldgeneration units magnetized in the second direction become the pluralityof second magnetic field generation units.

The foregoing fabrication method for the magnetic field generatorrequires that the magnetic fields to be applied have strengths largelydifferent between two adjacent initial magnetic field generation unitsor between one of the first magnetic field generation units and one ofthe initial magnetic field generation units adjacent each other. Toachieve this, measures such as an increase in the distance between thetwo adjacent magnetic field generation units are required. Thus, in themagnetic field generator including a plurality of magnetic fieldgeneration units each formed of a permanent magnet, the plurality ofmagnetic field generation units are difficult to arrange in a desiredpattern.

An increase in the distance between two adjacent magnetic fieldgeneration units results in a reduction in flexibility in thearrangement of the plurality of magnetic field generation units and anincrease in the area occupied by the plurality of magnetic fieldgeneration units. Furthermore, the difference of the external magneticfields is dull between the two adjacent magnetic field generation units,thus causing a reduction in the resolution of the magnetic sensor systemusing the magnetic field generator as the scale.

OBJECT AND SUMMARY OF THE INVENTION

It is an object of the present invention to provide a magnetic fieldgenerator that includes a plurality of magnetic field generation unitsarranged in a desired pattern and that has high immunity to disturbancemagnetic fields, and to provide a magnetic sensor system and a magneticsensor each including the magnetic field generator.

A magnetic field generator of the present invention includes a pluralityof magnetic field generation units arranged in a predetermined patternto generate a plurality of external magnetic fields. Each of theplurality of magnetic field generation units includes a firstferromagnetic material section and a first antiferromagnetic materialsection. The first antiferromagnetic material section is in contact withand exchange-coupled to the first ferromagnetic material section. Thefirst ferromagnetic material section has its overall magnetization. Theplurality of magnetic field generation units include two magnetic fieldgeneration units configured so that the overall magnetizations of theirrespective first ferromagnetic material sections are in differentdirections from each other.

In the magnetic field generator of the present invention, the firstferromagnetic material section may include a plurality of constituentlayers stacked on each other. In this case, the plurality of constituentlayers include a first ferromagnetic layer in contact with the firstantiferromagnetic material section. The plurality of constituent layersmay further include a second ferromagnetic layer which is locatedfarther from the first antiferromagnetic material section than is thefirst ferromagnetic layer. The plurality of constituent layers mayfurther include a nonmagnetic layer interposed between the firstferromagnetic layer and the second ferromagnetic layer. The firstferromagnetic layer and the second ferromagnetic layer may beferromagnetically exchange-coupled to each other via the nonmagneticlayer. In this case, each of the first ferromagnetic layer and thesecond ferromagnetic layer has a magnetization in the same direction asthe overall magnetization of the first ferromagnetic material section.Alternatively, the first ferromagnetic layer and the secondferromagnetic layer may be antiferromagnetically exchange-coupled toeach other via the nonmagnetic layer. In this case, the secondferromagnetic layer has a magnetization in the same direction as theoverall magnetization of the first ferromagnetic material section.

In the magnetic field generator of the present invention, the firstferromagnetic material section may have a first surface and a secondsurface opposite to each other. The first antiferromagnetic materialsection may be in contact with the first surface of the firstferromagnetic material section. In this case, each of the plurality ofmagnetic field generation units may further include a secondantiferromagnetic material section in contact with the second surface ofthe first ferromagnetic material section and exchange-coupled to thefirst ferromagnetic material section. The first and secondantiferromagnetic material sections may have different blockingtemperatures.

In the magnetic field generator of the present invention, the firstantiferromagnetic material section may have a first surface and a secondsurface opposite to each other. The first ferromagnetic material sectionmay be in contact with the first surface of the first antiferromagneticmaterial section. In this case, each of the plurality of magnetic fieldgeneration units may further include a second ferromagnetic materialsection in contact with the second surface of the firstantiferromagnetic material section and exchange-coupled to the firstantiferromagnetic material section. The second ferromagnetic materialsection has its overall magnetization.

A magnetic sensor system of the present invention includes a scale and amagnetic sensor arranged in a variable relative positional relationshipwith each other, and is configured to detect a physical quantityassociated with the relative positional relationship between the scaleand the magnetic sensor. The scale is formed of the magnetic fieldgenerator of the present invention.

In the magnetic sensor system of the present invention, the plurality ofmagnetic field generation units may be arranged in a row. In this case,any two adjacent ones of the plurality of magnetic field generationunits may be configured so that the overall magnetizations of theirrespective first ferromagnetic material sections are in differentdirections from each other. The direction of the overall magnetizationof the first ferromagnetic material section of one of the two adjacentmagnetic field generation units and the direction of the overallmagnetization of the first ferromagnetic material section of the otherof the two adjacent magnetic field generation units may intersect adirection in which the row of the plurality of magnetic field generationunits extends and may be opposite to each other.

In the magnetic sensor system of the present invention, the plurality ofmagnetic field generation units may be annularly arranged to form anaggregation having an outer periphery and an inner periphery. In thiscase, any two adjacent ones of the plurality of magnetic fieldgeneration units may be configured so that the overall magnetizations oftheir respective first ferromagnetic material sections are in differentdirections from each other. The overall magnetization of the firstferromagnetic material section of one of the two adjacent magnetic fieldgeneration units may be in a direction from the outer periphery to theinner periphery, and the overall magnetization of the firstferromagnetic material section of the other of the two adjacent magneticfield generation units may be in a direction from the inner periphery tothe outer periphery.

A magnetic sensor of the present invention includes a plurality ofmagnetic detection elements for detecting a target magnetic field, and abias magnetic field generator for generating a plurality of biasmagnetic fields to be applied to the plurality of magnetic detectionelements. The bias magnetic field generator is formed of the magneticfield generator of the present invention. Each of the plurality of biasmagnetic fields results from the overall magnetization of the firstferromagnetic material section of at least one of the plurality ofmagnetic field generation units.

In the magnetic sensor of the present invention, each of the pluralityof magnetic detection elements may be a magnetoresistance element. Themagnetoresistance element may include a magnetization pinned layerhaving a magnetization pinned in a certain direction, a free layerhaving a magnetization that varies depending on the target magneticfield, and a nonmagnetic layer located between the magnetization pinnedlayer and the free layer. The overall magnetization of the firstferromagnetic material section of any one of the plurality of magneticfield generation units may be in a direction intersecting the directionof the magnetization of the magnetization pinned layer of a specificmagnetoresistance element that is to be subjected to a bias magneticfield resulting from the overall magnetization of the firstferromagnetic material section of the one of the plurality of magneticfield generation units.

In the magnetic sensor of the present invention, the plurality ofmagnetic detection elements may include a first magnetic detectionelement and a second magnetic detection element connected in series. Theplurality of magnetic field generation units may include a firstmagnetic field generation unit and a second magnetic field generationunit. A bias magnetic field to be applied to the first magneticdetection element results from the overall magnetization of the firstferromagnetic material section of the first magnetic field generationunit. A bias magnetic field to be applied to the second magneticdetection element results from the overall magnetization of the firstferromagnetic material section of the second magnetic field generationunit. The first and second magnetic field generation units areconfigured so that the overall magnetizations of their respective firstferromagnetic material sections are in different directions from eachother.

In the magnetic sensor of the present invention, the plurality ofmagnetic detection elements may include a first magnetic detectionelement and a second magnetic detection element connected in series. Theplurality of magnetic field generation units may include a first to afourth magnetic field generation unit. A bias magnetic field to beapplied to the first magnetic detection element results from the overallmagnetization of the first ferromagnetic material section of the firstmagnetic field generation unit and the overall magnetization of thefirst ferromagnetic material section of the second magnetic fieldgeneration unit. A bias magnetic field to be applied to the secondmagnetic detection element results from the overall magnetization of thefirst ferromagnetic material section of the third magnetic fieldgeneration unit and the overall magnetization of the first ferromagneticmaterial section of the fourth magnetic field generation unit. The firstand third magnetic field generation units are adjacent to each other andconfigured so that the overall magnetizations of their respective firstferromagnetic material sections are in different directions from eachother. The second and fourth magnetic field generation units areadjacent to each other and configured so that the overall magnetizationsof their respective first ferromagnetic material sections are indifferent directions from each other.

In each of the magnetic field generation units in the magnetic fieldgenerator of the present invention, the direction of the overallmagnetization of the first ferromagnetic material section is defined byexchange coupling between the first antiferromagnetic material sectionand the first ferromagnetic material section. In each magnetic fieldgeneration unit, even if a disturbance magnetic field having a highstrength sufficient to reverse the direction of the overallmagnetization of the first ferromagnetic material section is temporarilyapplied, the direction of the overall magnetization of the firstferromagnetic material section returns to an original direction upondisappearance of such a disturbance magnetic field. Further, themagnetic field generator of the present invention can be easilyfabricated without the need for increasing the distance between twoadjacent magnetic field generation units. The present invention thusmakes it possible to provide a magnetic field generator that includes aplurality of magnetic field generation units arranged in a desiredpattern and that has high immunity to disturbance magnetic fields, andto provide a magnetic sensor system and a magnetic sensor each includingthe magnetic field generator.

Other and further objects, features and advantages of the presentinvention will appear more fully from the following description.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a perspective view illustrating the general configuration of amagnetic sensor system according to a first embodiment of the invention.

FIG. 2 is a perspective view of a part of a magnetic field generatoraccording to the first embodiment of the invention.

FIG. 3 is a side view illustrating a first example of a magnetic fieldgeneration unit of the first embodiment of the invention.

FIG. 4 is a side view illustrating a second example of the magneticfield generation unit of the first embodiment of the invention.

FIG. 5 is a side view illustrating a third example of the magnetic fieldgeneration unit of the first embodiment of the invention.

FIG. 6 is a side view illustrating a fourth example of the magneticfield generation unit of the first embodiment of the invention.

FIG. 7 is a side view illustrating a fifth example of the magnetic fieldgeneration unit of the first embodiment of the invention.

FIG. 8 is a side view illustrating a seventh example of the magneticfield generation unit of the first embodiment of the invention.

FIG. 9 is a side view illustrating an eighth example of the magneticfield generation unit of the first embodiment of the invention.

FIG. 10 is a perspective view of a magnetic sensor of the firstembodiment of the invention.

FIG. 11 is a circuit diagram of the magnetic sensor of the firstembodiment of the invention.

FIG. 12 is a side view illustrating an example of the configuration ofan MR element of the first embodiment of the invention.

FIG. 13 is a characteristic diagram illustrating the magnetization curveof a permanent magnet.

FIG. 14 is a characteristic diagram illustrating the magnetization curveof the magnetic field generation unit.

FIG. 15 is a perspective view illustrating the general configuration ofa magnetic sensor system according to a second embodiment of theinvention.

FIG. 16 is a perspective view illustrating the general configuration ofa magnetic sensor system of a third embodiment of the invention.

FIG. 17 is a circuit diagram of a magnetic sensor according to the thirdembodiment of the invention.

FIG. 18 is a cross-sectional view of a part of the magnetic sensoraccording to the third embodiment of the invention.

FIG. 19 is a side view illustrating an example of configurations of theMR element and the magnetic field generation unit of the thirdembodiment of the invention.

FIG. 20 is a perspective view illustrating the general configuration ofa modification example of the magnetic sensor system of the thirdembodiment of the invention.

FIG. 21 is a circuit diagram of a magnetic sensor according to a fourthembodiment of the invention.

FIG. 22 is a cross-sectional view of a part of the magnetic sensoraccording to the fourth embodiment of the invention.

FIG. 23 is a circuit diagram of a magnetic sensor according to a fifthembodiment of the invention.

FIG. 24 is a circuit diagram illustrating the circuit configuration of amagnetic sensor system of a sixth embodiment of the invention.

FIG. 25 is a circuit diagram illustrating the circuit configuration of amagnetic sensor system of a seventh embodiment of the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS First Embodiment

Preferred embodiments of the present invention will now be described indetail with reference to the drawings. First, reference is made to FIG.1 to describe the general configuration of a magnetic sensor systemaccording to a first embodiment of the invention. The magnetic sensorsystem according to the first embodiment includes a scale 1 and amagnetic sensor 4 arranged in a variable relative positionalrelationship with each other. The magnetic sensor system is configuredto detect a physical quantity associated with the relative positionalrelationship between the scale 1 and the magnetic sensor 4. The scale 1of the first embodiment is a linear scale formed of a magnetic fieldgenerator 100 according to the first embodiment. The magnetic fieldgenerator 100 includes a plurality of magnetic field generation units200 arranged in a predetermined pattern to generate a plurality ofexternal magnetic fields. In the first embodiment, the plurality ofmagnetic field generation units 200 are arranged in a row.

In the first embodiment, the direction in which the row of the pluralityof magnetic field generation units 200 extends is denoted as the Xdirection. Two directions perpendicular to the X direction andperpendicular to each other are denoted as the Y direction and the Zdirection. As used herein, each of the X, Y and Z directions is definedas including one particular direction and the opposite directionthereto, as indicated by the respective double-headed arrows in FIG. 1.On the other hand, the direction of any magnetic field or magnetizationis defined as indicating a single particular direction.

Each of the plurality of magnetic field generation units 200 is shapedlike a rectangular solid, for example. The plurality of magnetic fieldgeneration units 200 have equal or nearly equal widths in the Xdirection. The scale 1 has a side surface 1 a perpendicular to the Zdirection. The magnetic sensor 4 is placed to face the side surface 1 aof the scale 1. One of the scale 1 and the magnetic sensor 4 moveslinearly in the X direction in response to the movement of a movingobject (not illustrated). This causes a change in the relativepositional relationship between the scale 1 and the magnetic sensor 4.The magnetic sensor system detects, as the physical quantity associatedwith the relative positional relationship between the scale 1 and themagnetic sensor 4, the relative position and/or speed of the scale 1with respect to the magnetic sensor 4.

A change in the relative positional relationship between the scale 1 andthe magnetic sensor 4 causes a change in the direction of the targetmagnetic field for the magnetic sensor 4, that is, a magnetic field tobe applied to the magnetic sensor 4 on the basis of part of theplurality of external magnetic fields generated by the plurality ofmagnetic field generation units 200. In the example shown in FIG. 1, anX-directional orthogonal projection component of the target magneticfield vibrates at the location of the magnetic sensor 4.

The configuration of the plurality of magnetic field generation units200 will now be described with reference to FIG. 1 to FIG. 3. FIG. 2 isa perspective view of a part of the magnetic field generator 100. FIG. 3is a side view illustrating a first example of a magnetic fieldgeneration unit 200. As shown in FIG. 3, each of the plurality ofmagnetic field generation units 200 includes a first ferromagneticmaterial section 220 and a first antiferromagnetic material section 210.In the first embodiment, the first ferromagnetic material section 220and the first antiferromagnetic material section 210 are stacked alongthe Y direction. The first ferromagnetic material section 220 has afirst surface 220 a and a second surface 220 b opposite to each other.The first antiferromagnetic material section 210 is in contact with thefirst surface 220 a of the first ferromagnetic material section 220 andexchange-coupled to the first ferromagnetic material section 220.

The first ferromagnetic material section 220 has its overallmagnetization. The overall magnetization of the first ferromagneticmaterial section 220 refers to the volume average of the vector sum ofmagnetic moments in units of atoms, crystal lattices, or the like in theentire first ferromagnetic material section 220. Hereinafter, theoverall magnetization of the first ferromagnetic material section 220will simply be referred to as the magnetization of the firstferromagnetic material section 220. Each of the hollow arrows in FIG. 1and FIG. 2 indicates the direction of the magnetization of the firstferromagnetic material section 220.

In the magnetic field generator 100 according to the first embodiment,the direction of the magnetization of the first ferromagnetic materialsection 220 is defined by exchange coupling between the firstantiferromagnetic material section 210 and the first ferromagneticmaterial section 220. The magnetic field generator 100 has high immunityto disturbance magnetic fields. This will be described in detail later.

The plurality of magnetic field generation units 200 include twomagnetic field generation units configured so that the magnetizations oftheir respective first ferromagnetic material sections 220 are indifferent directions from each other. In FIG. 2, reference symbols 200Aand 200B represent any two adjacent ones of the plurality of magneticfield generation units 200. As shown in FIG. 2, the two magnetic fieldgeneration units 200A and 200B are configured so that the magnetizationsof their respective first ferromagnetic material sections 220 are indifferent directions from each other. In the first embodiment, inparticular, the direction of the magnetization of the firstferromagnetic material section 220 of the magnetic field generation unit200A and the direction of the magnetization of the first ferromagneticmaterial section 220 of the magnetic field generation unit 200Bintersect the X direction, i.e., the direction in which the row of theplurality of magnetic field generation units 200 extend, and areopposite to each other.

Now, a first direction D1 and a second direction D2 will be defined asshown in FIG. 2. In the first embodiment, each of the first and seconddirections D1 and D2 is one particular direction parallel to the Zdirection. In FIG. 2, the first direction D1 is toward the lower left.The second direction D2 is opposite to the first direction D1. In theexample shown in FIG. 2, the magnetization of the first ferromagneticmaterial section 220 of the magnetic field generation unit 200A is inthe first direction D1. The magnetization of the first ferromagneticmaterial section 220 of the magnetic field generation unit 200B is inthe second direction D2.

The first ferromagnetic material section 220 may be constituted by asingle ferromagnetic layer or may include a plurality of constituentlayers stacked on each other. The first example of the magnetic fieldgeneration unit 200 shown in FIG. 3 is where the first ferromagneticmaterial section 220 is constituted by a single ferromagnetic layer. Inthe first example, the first ferromagnetic material section 220, aferromagnetic layer, is formed of a ferromagnetic material containingone or more elements selected from the group consisting of Co, Fe, andNi. Examples of such a ferromagnetic material include CoFe, CoFeB, andCoNiFe. The first antiferromagnetic material section 210 is formed of anantiferromagnetic material such as IrMn or PtMn.

Second to eighth examples of the magnetic field generation units 200will now be described with reference to FIG. 4 to FIG. 9. Each of thesecond to eighth examples is where the first ferromagnetic materialsection 220 includes a plurality of constituent layers stacked on eachother.

FIG. 4 shows the second example of the magnetic field generation unit200. In the second example, the plurality of constituent layers of thefirst ferromagnetic material section 220 include a first ferromagneticlayer 221 in contact with the first antiferromagnetic material section210, and a second ferromagnetic layer 222 located farther from the firstantiferromagnetic material section 210 than the first ferromagneticlayer 221. Each of the first and second ferromagnetic layers 221 and 222has a magnetization in the same direction as the magnetization of thefirst ferromagnetic material section 220. In FIG. 4, the hollow arrowsin the first and second ferromagnetic layers 221 and 222 indicate thedirection of the magnetizations of the first and second ferromagneticlayers 221 and 222. In any figures that are similar to FIG. 4 and are tobe referred to for descriptions below, the directions of magnetizationsof ferromagnetic layers such as the first and second ferromagneticlayers 221 and 222 will be illustrated in the same manner as in FIG. 4.

To enhance the external magnetic fields to be generated by the magneticfield generation units 200 and miniaturize the magnetic field generationunits 200, the first ferromagnetic material section 220 preferablyincludes a ferromagnetic layer formed of a ferromagnetic material havinga high saturation magnetic flux density. However, such a ferromagneticlayer does not always provide high exchange coupling energy betweenitself and the first antiferromagnetic material section 210. Thus, inthe second example, the first ferromagnetic layer 221 is preferablyformed of a ferromagnetic material that can increase exchange couplingenergy between the first ferromagnetic layer 221 and the firstantiferromagnetic material section 210, and the second ferromagneticlayer 222 is preferably formed of a ferromagnetic material that has ahigher saturation magnetic flux density than the ferromagnetic materialused to form the first ferromagnetic layer 221. This makes it possibleto enhance the external magnetic fields to be generated by the magneticfield generation units 200 and miniaturize the magnetic field generationunits 200, while increasing the exchange coupling energy between thefirst ferromagnetic material section 220 and the first antiferromagneticmaterial section 210. Examples of the first ferromagnetic layer 221include a CoFe layer. Examples of the second ferromagnetic layer 222include an Fe layer.

FIG. 5 shows the third example of the magnetic field generation unit200. In the third example, the plurality of constituent layers of thefirst ferromagnetic material section 220 include the first and secondferromagnetic layers 221 and 222, as in the second example. The firstand second ferromagnetic layers 221 and 222 may be formed of the sameferromagnetic material or different ferromagnetic materials.

The plurality of constituent layers in the third example further includea nonmagnetic layer 224 located between the first and secondferromagnetic layers 221 and 222. The nonmagnetic layer 224 may beformed of Ru, for example. In the third example, the first and secondferromagnetic layers 221 and 222 are ferromagnetically exchange-coupledto each other via the nonmagnetic layer 224 so that the first and secondferromagnetic layers 221 and 222 have magnetizations in the samedirection. The direction of the magnetizations of the first and secondferromagnetic layers 221 and 222 is the same as the direction of themagnetization of the first ferromagnetic material section 220. Thenonmagnetic layer 224 has a thickness sufficient to maintain theexchange coupling between the first and second ferromagnetic layers 221and 222.

FIG. 6 shows the fourth example of the magnetic field generation unit200. In the fourth example, the constituent layers of the firstferromagnetic material section 220 include the first ferromagnetic layer221, the second ferromagnetic layer 222 and the nonmagnetic layer 224,as in the third example. In the fourth example, the first and secondferromagnetic layers 221 and 222 are antiferromagneticallyexchange-coupled to each other via the nonmagnetic layer 224 so that thefirst and second ferromagnetic layers 221 and 222 have magnetizations inmutually opposite directions. The magnetization of the firstferromagnetic layer 221 is in the opposite direction to themagnetization of the first ferromagnetic material section 220, whereasthe magnetization of the second ferromagnetic layer 222 is in the samedirection as the magnetization of the first ferromagnetic materialsection 220.

In the fourth example, the sum total of magnetic moments on a unit basisin the entire second ferromagnetic layer 222 is higher than the sumtotal of magnetic moments on a unit basis in the entire firstferromagnetic layer 221. Thus, in the fourth example, the magnetizationof the first ferromagnetic material section 220 is in the same directionas the magnetization of the second ferromagnetic layer 222.

Examples of the first ferromagnetic layer 221 include a Co₉₀Fe₁₀ layer.Examples of the second ferromagnetic layer 222 include a Co₃₀Fe₇₀ layer.Co₉₀Fe₁₀ represents an alloy composed of 90 atomic percent Co and 10atomic percent Fe. Co₃₀Fe₇₀ represents an alloy composed of 30 atomicpercent Co and 70 atomic percent Fe. The second ferromagnetic layer 222preferably has a greater thickness than the first ferromagnetic layer221.

In the fourth example, the exchange coupling energy between the firstferromagnetic layer 221 and the second ferromagnetic layer 222, whichare antiferromagnetically coupled to each other, can sometimes be higherthan the exchange coupling energy between the first antiferromagneticmaterial section 210 and the first ferromagnetic layer 221. In such acase, the magnetization fixing force of the second ferromagnetic layer222 is enhanced, and consequently the magnetic field generator 100 hasenhanced immunity to disturbance magnetic fields.

FIG. 7 shows the fifth example of the magnetic field generation unit200. In the fifth example, each of the plurality of magnetic fieldgeneration units 200 includes a second antiferromagnetic materialsection 230 in addition to the first ferromagnetic material section 220and the first antiferromagnetic material section 210. The secondantiferromagnetic material section 230 is in contact with the secondsurface 220 b of the first ferromagnetic material section 220 andexchange-coupled to the first ferromagnetic material section 220. Thesecond antiferromagnetic material section 230 is formed of, for example,the same antiferromagnetic material as the first antiferromagneticmaterial section 210 in the first example. In the fifth example, inparticular, the first antiferromagnetic material section 210 and thesecond antiferromagnetic material section 230 are formed of the sameantiferromagnetic material.

In the fifth example, the plurality of constituent layers of the firstferromagnetic material section 220 include the first and secondferromagnetic layers 221 and 222, as in the second example. Theplurality of constituent layers in the fifth example further include athird ferromagnetic layer 223 located farther from the firstantiferromagnetic material section 210 than the first and secondferromagnetic layers 221 and 222 and in contact with the secondantiferromagnetic material section 230. The first ferromagnetic layer221, the second ferromagnetic layer 222 and the third ferromagneticlayer 223 have magnetizations in the same direction as the magnetizationof the first ferromagnetic material section 220. In the fifth example,the first and third ferromagnetic layers 221 and 223 are preferablyformed of a ferromagnetic material that can increase exchange couplingenergy between the first ferromagnetic layer 221 and the firstantiferromagnetic material section 210 and between the thirdferromagnetic layer 223 and the second antiferromagnetic materialsection 230, and the second ferromagnetic layer 222 is preferably formedof a ferromagnetic material that has a higher saturation magnetic fluxdensity than the ferromagnetic material used to form the first and thirdferromagnetic layers 221 and 223. Examples of the first and thirdferromagnetic layers 221 and 223 include a CoFe layer. Examples of thesecond ferromagnetic layer 222 include an Fe layer.

The direction of the magnetization of the first ferromagnetic materialsection 220 is defined by exchange coupling of the first ferromagneticmaterial section 220 with the first and second antiferromagneticmaterial sections 210 and 230. The fifth example allows themagnetization fixing force of the first ferromagnetic material section220 to be higher, and consequently allows the magnetic field generator100 to have higher immunity to disturbance magnetic fields, whencompared with a case where each magnetic field generation unit 200includes only the first antiferromagnetic material section 210 and thefirst ferromagnetic material section 220.

In the fifth example, the first ferromagnetic material section 220 inthe first example shown in FIG. 3 may be used instead of the firstferromagnetic material section 220 shown in FIG. 7. In such a case also,the direction of the magnetization of the first ferromagnetic materialsection 220 is defined by exchange coupling of the first ferromagneticmaterial section 220 with the first and second antiferromagneticmaterial sections 210 and 230.

Next, the sixth example of the magnetic field generation unit 200 willbe described. The magnetic field generation unit 200 in the sixthexample has basically the same configuration as the magnetic fieldgeneration unit 200 in the fifth example shown in FIG. 7. In the sixthexample, however, the first antiferromagnetic material section 210 andthe second antiferromagnetic material section 230 have differentblocking temperatures.

The operation and effect of the sixth example will now be described. Byway of example, a description will be given of a case where the firstantiferromagnetic material section 210 is an IrMn layer, the secondantiferromagnetic material section 230 is a PtMn layer, and each of thefirst and third ferromagnetic layers 221 and 223 is a CoFe layer. Inthis case, the coupling force between the first antiferromagneticmaterial section 210 and the first ferromagnetic layer 221 is higherthan the coupling force between the second antiferromagnetic materialsection 230 and the third ferromagnetic layer 223. On the other hand,the second antiferromagnetic material section 230 (PtMn layer) has ahigher blocking temperature than the first antiferromagnetic materialsection 210 (IrMn layer). In this case, when the temperature of themagnetic field generation unit 200 exceeds the blocking temperature ofthe first antiferromagnetic material section 210, the exchange couplingbetween the first antiferromagnetic material section 210 and the firstferromagnetic layer 221 disappears. However, if the temperature of themagnetic field generation unit 200 is less than the blocking temperatureof the second antiferromagnetic material section 230, the exchangecoupling between the second antiferromagnetic material section 230 andthe third ferromagnetic layer 223 does not disappear, so that themagnetization of the first ferromagnetic material section 220 does notchange direction. After that, when the temperature of the magnetic fieldgeneration unit 200 becomes lower than the blocking temperature of thefirst antiferromagnetic material section 210, the strong couplingbetween the first antiferromagnetic material section 210 and the firstferromagnetic layer 221 is reconstructed with the direction of themagnetization of the first ferromagnetic material section 220maintained. The sixth example thus provides a magnetic field generator100 in which the magnetizations of the first ferromagnetic materialsections 220 are hard to change direction even when subjected to a hightemperature.

FIG. 8 shows the seventh example of the magnetic field generation unit200. In the seventh example, each of the plurality of magnetic fieldgeneration units 200 includes the first ferromagnetic material section220, the first antiferromagnetic material section 210 and the secondantiferromagnetic material section 230, as in the fifth example. Theconstituent layers of the first ferromagnetic material section 220include the first to third ferromagnetic layers 221, 222 and 223, as inthe fifth example. The first to third ferromagnetic layers 221 to 223may be formed of the same ferromagnetic material or ferromagneticmaterials different from each other. Alternatively, two of the first tothird ferromagnetic layers 221 to 223 may be formed of the sameferromagnetic material.

The constituent layers in the seventh example further include anonmagnetic layer 224 interposed between the first ferromagnetic layer221 and the second ferromagnetic layer 222, and a nonmagnetic layer 225interposed between the second ferromagnetic layer 222 and the thirdferromagnetic layer 223. The nonmagnetic layers 224 and 225 may beformed of Ru, for example. The first and second ferromagnetic layers 221and 222 are antiferromagnetically exchange-coupled to each other via thenonmagnetic layer 224. The second and third ferromagnetic layers 222 and223 are antiferromagnetically exchange-coupled to each other via thenonmagnetic layer 225. Each of the first and third ferromagnetic layers221 and 223 has a magnetization in the opposite direction to themagnetization of the first ferromagnetic material section 220, whereasthe second ferromagnetic layer 222 has a magnetization in the samedirection as the magnetization of the first ferromagnetic materialsection 220.

In the seventh example, the sum total of magnetic moments on a unitbasis in the entire second ferromagnetic layer 222 is higher than thesum total of magnetic moments on a unit basis in each of the entirefirst ferromagnetic layer 221 and the entire third ferromagnetic layer223. Thus, in the seventh example, the magnetization of the firstferromagnetic material section 220 is in the same direction as the themagnetization of the second ferromagnetic layer 222.

FIG. 9 shows the eighth example of the magnetic field generation unit200. In the eighth example, each of the plurality of magnetic fieldgeneration units 200 includes the first ferromagnetic material section220, the first antiferromagnetic material section 210 and the secondantiferromagnetic material section 230, as in the fifth example. Theconstituent layers of the first ferromagnetic material section 220include the first to third ferromagnetic layers 221, 222 and 223, as inthe fifth example. The first to third ferromagnetic layers 221 to 223may be formed of the same ferromagnetic material or ferromagneticmaterials different from each other. Alternatively, two of the first tothird ferromagnetic layers 221 to 223 may be formed of the sameferromagnetic material.

The first antiferromagnetic material section 210 has a first surface 210a and a second surface 210 b opposite to each other. The firstferromagnetic material section 220 is in contact with the first surface210 a of the first antiferromagnetic material section 210. Each of theplurality of magnetic field generation units 200 in the eighth examplefurther includes a second ferromagnetic material section 240 in contactwith the second surface 210 b of the first antiferromagnetic materialsection 210 and exchange-coupled to the first antiferromagnetic materialsection 210. The second ferromagnetic material section 240 has itsoverall magnetization. Hereinafter, the overall magnetization of thesecond ferromagnetic material section 240 will simply be referred to asthe magnetization of the second ferromagnetic material section 240. Themagnetization of the second ferromagnetic material section 240 is in thesame direction as the magnetization of the first ferromagnetic materialsection 220.

The second ferromagnetic material section 240 has a first surface 240 aand a second surface 240 b opposite to each other. The first surface 240a of the second ferromagnetic material section 240 is in contact withthe second surface 210 b of the first antiferromagnetic material section210. Each of the plurality of magnetic field generation units 200 in theeighth example further includes a third antiferromagnetic materialsection 250 in contact with the second surface 240 b of the secondferromagnetic material section 240 and exchange-coupled to the secondferromagnetic material section 240. The first to third antiferromagneticmaterial sections 210, 230 and 250 may be formed of the sameantiferromagnetic material or antiferromagnetic materials different fromeach other. Alternatively, two of the first to third antiferromagneticmaterial sections 210, 230 and 250 may be formed of the sameantiferromagnetic material.

The second ferromagnetic material section 240 includes a plurality ofconstituent layers stacked on each other. The plurality of constituentlayers include a first ferromagnetic layer 241, a second ferromagneticlayer 242 and a third ferromagnetic layer 243. The first ferromagneticlayer 241 is in contact with the first antiferromagnetic materialsection 210. The second ferromagnetic layer 242 is located farther fromthe first antiferromagnetic material section 210 than is the firstferromagnetic layer 241. The third ferromagnetic layer 243 is locatedfarther from the first antiferromagnetic material section 210 than arethe first and second ferromagnetic layers 241 and 242 and in contactwith the third antiferromagnetic material section 250. The first tothird ferromagnetic layers 241 to 243 may be formed of the sameferromagnetic material or ferromagnetic materials different from eachother. Alternatively, two of the first to third ferromagnetic layers 241to 243 may be formed of the same ferromagnetic material.

Each magnetic field generation unit 200 in the eighth example includesthe two ferromagnetic material sections 220 and 240 havingmagnetizations in the same direction. The eighth example thus makes itpossible to enhance the immunity of the magnetic field generator 100 todisturbance magnetic fields. Further, according to the eighth example,it is possible to set the magnetizations of the two ferromagneticmaterial sections 220 and 240 in the same direction by using the singleantiferromagnetic material section 210. The eighth example thus allowsfor efficient fabrication of the two ferromagnetic material sections 220and 240 having magnetizations in the same direction.

In the eighth example, the first ferromagnetic material section 220shown in FIG. 9 may be replaced with the first ferromagnetic materialsection 220 of the first or seventh example shown in FIG. 3 or FIG. 8.Further, the second ferromagnetic material section 240 shown in FIG. 9may be replaced with a ferromagnetic material section having the sameconfiguration as the first ferromagnetic material section 220 of thefirst or seventh example shown in FIG. 3 or FIG. 8. Further, themagnetic field generation unit 200 of the first embodiment may beconfigured by omitting the second and third antiferromagnetic materialsections 230 and 250 from the magnetic field generation unit 200 shownin FIG. 9.

An example of the configuration of the magnetic sensor 4 of the firstembodiment will now be described with reference to FIG. 10 and FIG. 11.FIG. 10 is a perspective view of the magnetic sensor 4. FIG. 11 is acircuit diagram of the magnetic sensor 4. The magnetic sensor 4 includesfour magnetoresistance (MR) elements 10A, 10B, 10C and 10D, a substrate(not illustrated), two upper electrodes 31 and 32, and two lowerelectrodes 41 and 42. The lower electrodes 41 and 42 are placed on thenon-illustrated substrate.

The upper electrode 31 has a base part 310, and two branch parts 311 and312 branching off from the base part 310. The upper electrode 32 has abase part 320, and two branch parts 321 and 322 branching off from thebase part 320. The lower electrode 41 has a base part 410, and twobranch parts 411 and 412 branching off from the base part 410. The lowerelectrode 42 has a base part 420, and two branch parts 421 and 422branching off from the base parts 420. The branch part 311 of the upperelectrode 31 is opposed to the branch part 411 of the lower electrode41. The branch part 312 of the upper electrode 31 is opposed to thebranch part 421 of the lower electrode 42. The branch part 321 of theupper electrode 32 is opposed to the branch part 412 of the lowerelectrode 41. The branch part 322 of the upper electrode 32 is opposedto the branch part 422 of the lower electrode 42.

The MR element 10A is located between the branch part 411 of the lowerelectrode 41 and the branch part 311 of the upper electrode 31. The MRelement 10B is located between the branch part 421 of the lowerelectrode 42 and the branch part 312 of the upper electrode 31. The MRelement 10C is located between the branch part 422 of the lowerelectrode 42 and the branch part 322 of the upper electrode 32. The MRelement 10D is located between the branch part 412 of the lowerelectrode 41 and the branch part 321 of the upper electrode 32.

As shown in FIG. 10, the base part 310 of the upper electrode 31includes a first output port E1. The base part 320 of the upperelectrode 32 includes a second output port E2. The base part 410 of thelower electrode 41 includes a power supply port V. The base part 420 ofthe lower electrode 42 includes a ground port G.

The MR element 10A and the MR element 10B are connected in series viathe upper electrode 31. The MR element 10C and the MR element 10D areconnected in series via the upper electrode 32.

As shown in FIG. 11, one end of the MR element 10A is connected to thepower supply port V. The other end of the MR element 10A is connected tothe first output port E1. One end of the MR element 10B is connected tothe first output port E1. The other end of the MR element 10B isconnected to the ground port G. The MR elements 10A and 10B constitute ahalf-bridge circuit. One end of the MR element 10C is connected to thesecond output port E2. The other end of the MR element 10C is connectedto the ground port G. One end of the MR element 10D is connected to thepower supply port V. The other end of the MR element 10D is connected tothe second output port E2. The MR elements 10C and 10D constitute ahalf-bridge circuit. The MR elements 10A, 10B, 10C and 10D constitute aWheatstone bridge circuit.

A power supply voltage of a predetermined magnitude is applied to thepower supply port V. The ground port G is grounded. Each of the MRelements 10A, 10B, 10C and 10D varies in resistance depending on thetarget magnetic field. The resistances of the MR elements 10A and 10Cvary in phase with each other. The resistances of the MR elements 10Band 10D vary 180° out of phase with the resistances of the MR elements10A and 10C. The first output port E1 outputs a first detection signalcorresponding to the potential at the connection point between the MRelements 10A and 10B. The second output port E2 outputs a seconddetection signal corresponding to the potential at the connection pointbetween the MR elements 10D and 10C. The first and second detectionsignals vary depending on the target magnetic field. The seconddetection signal is 180° out of phase with the first detection signal.The magnetic sensor 4 generates an output signal by a computation thatincludes determining the difference between the first detection signaland the second detection signal. For example, the output signal from themagnetic sensor 4 is generated by adding a predetermined offset voltageto a signal obtained by subtracting the second detection signal from thefirst detection signal. The output signal from the magnetic sensor 4varies depending on the target magnetic field.

An example of the configuration of the MR elements 10A to 10D will nowbe described with reference to FIG. 12. FIG. 12 is a side viewillustrating an example of the configuration of the MR elements 10A to10D. In the following description, reference numeral 10 is used torepresent each MR element, and reference numerals 30 and 40 are used torepresent each upper electrode and each lower electrode, respectively.In the first embodiment, the MR element 10 is a spin-valve MR element.The MR element 10 includes at least a magnetization pinned layer 13having a magnetization pinned in a certain direction, a free layer 15having a magnetization that varies depending on the target magneticfield, and a nonmagnetic layer 14 located between the magnetizationpinned layer 13 and the free layer 15.

In the example shown in FIG. 12, the MR element 10 further includes anunderlayer 11, an antiferromagnetic layer 12 and a protective layer 16.In this example, the underlayer 11, the antiferromagnetic layer 12, themagnetization pinned layer 13, the nonmagnetic layer 14, the free layer15 and the protective layer 16 are stacked in this order along the Zdirection, the underlayer 11 being closest to the lower electrode 40.The underlayer 11 and the protective layer 16 are conductive. Theunderlayer 11 is provided to eliminate the effects of the crystal axisof the non-illustrated substrate and to improve the crystallinity andorientability of the layers to be formed over the underlayer 11. Theunderlayer 11 may be formed of Ta or Ru, for example. Theantiferromagnetic layer 12 is to pin the direction of the magnetizationof the magnetization pinned layer 13 by means of exchange coupling withthe magnetization pinned layer 13. The antiferromagnetic layer 12 isformed of an antiferromagnetic material such as IrMn or PtMn.

The magnetization of the magnetization pinned layer 13 is pinned in acertain direction by the exchange coupling between the antiferromagneticlayer 12 and the magnetization pinned layer 13. In the example shown inFIG. 12, the magnetization pinned layer 13 includes an outer layer 131,a nonmagnetic intermediate layer 132 and an inner layer 133 stacked inthis order on the antiferromagnetic layer 12, and is thus formed as aso-called synthetic pinned layer. The outer layer 131 and the innerlayer 133 are each formed of a ferromagnetic material such as CoFe,CoFeB or CoNiFe. The outer layer 131 is exchange-coupled to theantiferromagnetic layer 12 and thus the magnetization direction thereofis pinned. The outer layer 131 and the inner layer 133 areantiferromagnetically coupled to each other, and their magnetizationsare thus pinned in mutually opposite directions. The nonmagneticintermediate layer 132 induces antiferromagnetic exchange couplingbetween the outer layer 131 and the inner layer 133 so as to pin themagnetizations of the outer layer 131 and the inner layer 133 inmutually opposite directions. The nonmagnetic intermediate layer 132 isformed of a nonmagnetic material such as Ru. When the magnetizationpinned layer 13 includes the outer layer 131, the nonmagneticintermediate layer 132 and the inner layer 133, the direction of themagnetization of the magnetization pinned layer 13 refers to that of theinner layer 133.

If the MR element 10 is a TMR element, the nonmagnetic layer 14 is atunnel barrier layer. The tunnel barrier layer may be formed byoxidizing a part or the whole of a magnesium layer. If the MR element 10is a GMR element, the nonmagnetic layer 14 is a nonmagnetic conductivelayer. The free layer 15 is formed of, for example, a soft magneticmaterial such as CoFe, CoFeB, NiFe, or CoNiFe. The protective layer 16is provided for protecting the layers located thereunder. The protectivelayer 16 may be formed of Ta, Ru, W, or Ti, for example.

The underlayer 11 is connected to the lower electrode 40, and theprotective layer 16 is connected to the upper electrode 30. The MRelement 10 is configured to be supplied with current by the lowerelectrode 40 and the upper electrode 30. The current flows in adirection intersecting the plane of the layers constituting the MRelement 10, such as the Z direction which is perpendicular to the planeof the layers constituting the MR element 10.

In the MR element 10, the magnetization of the free layer 15 variesdepending on the magnetic field applied to the free layer 15. Morespecifically, the direction and magnitude of the magnetization of thefree layer 15 vary depending on the direction and magnitude of themagnetic field applied to the free layer 15. The MR element 10 varies inresistance depending on the direction and magnitude of the magnetizationof the free layer 15. For example, if the free layer 15 has amagnetization of a constant magnitude, the MR element 10 has a minimumresistance when the magnetization of the free layer 15 is in the samedirection as that of the magnetization pinned layer 13, and has amaximum resistance when the magnetization of the free layer 15 is in theopposite direction to that of the magnetization pinned layer 13.

FIG. 10 shows an example in which the MR element 10 has a cylindricalshape. However, the MR element 10 may have other shapes such as arectangular solid shape. Reference is now made to FIG. 10 and FIG. 11 todescribe the magnetization directions of the magnetization pinned layers13 of the MR elements 10A to 10D. In FIG. 10 and FIG. 11 the filledarrows in the MR elements 10A to 10D indicate the magnetizationdirections of the magnetization pinned layers 13 of the MR elements 10Ato 10D. Now, a third direction D3 and a fourth direction D4 will bedefined as shown in FIG. 10 and FIG. 11. In the first embodiment, eachof the third and fourth directions D3 and D4 is one particular directionparallel to the X direction. In FIG. 10 and FIG. 11, the third directionD3 is rightward. The fourth direction D4 is opposite to the thirddirection D3.

As shown in FIG. 10 and FIG. 11, the magnetization pinned layer 13 ofthe MR element 10A is magnetized in the fourth direction D4, and themagnetization pinned layer 13 of the MR element 10B is magnetized in thethird direction D3. In this case, the potential at the connection pointbetween the MR elements 10A and 10B varies depending on the strength ofa component of the target magnetic field in a direction parallel to thethird and fourth directions D3 and D4, i.e., in the X direction. Such acomponent of the target magnetic field will be referred to as theX-directional component of the target magnetic field. The first outputport E1 outputs the first detection signal corresponding to thepotential at the connection point between the MR elements 10A and 10B.The first detection signal represents the strength of the X-directionalcomponent of the target magnetic field.

As shown in FIG. 10 and FIG. 11, the magnetization pinned layer 13 ofthe MR element 10C is magnetized in the fourth direction D4, and themagnetization pinned layer 13 of the MR element 10D is magnetized in thethird direction D3. In this case, the potential at the connection pointbetween the MR elements 10C and 10D varies depending on the strength ofthe X-directional component of the target magnetic field. The secondoutput port E2 outputs the second detection signal corresponding to thepotential at the connection point between the MR elements 10C and 10D.The second detection signal represents the strength of the X-directionalcomponent of the target magnetic field.

As for the MR element 10A and the MR element 10D, their respectivemagnetization pinned layers 13 are magnetized in mutually oppositedirections. As for the MR element 10B and the MR element 10C, theirrespective magnetization pinned layers 13 are magnetized in mutuallyopposite directions. Thus, the second detection signal has a phasedifference of 180° with respect to the first detection signal.

In consideration of the production accuracy of the MR elements 10A to10D and other factors, the magnetization directions of the magnetizationpinned layers 13 of the MR elements 10A to 10D may be slightly differentfrom the above-described directions.

The operations and effects of the magnetic field generator 100 and themagnetic sensor system according to the first embodiment will now bedescribed. In the first embodiment, each of the plurality of magneticfield generation units 200 includes the first ferromagnetic materialsection 220 and the first antiferromagnetic material section 210. Thefirst antiferromagnetic material section 210 is exchange-coupled to thefirst ferromagnetic material section 220. The direction of themagnetization of the first ferromagnetic material section 220 is therebydefined.

The effects of the magnetic field generator 100 and the magnetic sensorsystem according to the first embodiment will be described in comparisonwith a magnetic field generator and a magnetic sensor system of acomparative example. The magnetic field generator of the comparativeexample includes, in place of the plurality of magnetic field generationunits 200 of the first embodiment, a plurality of magnetic fieldgeneration units each formed of a permanent magnet. The magnetic sensorsystem of the comparative example uses the magnetic field generator ofthe comparative example, in place of the magnetic field generator 100according to the first embodiment.

First, with reference to FIG. 13 and FIG. 14, comparisons will be madebetween a magnetization curve of a permanent magnet and that of themagnetic field generation unit 200. FIG. 13 is a characteristic diagramillustrating the magnetization curve of a permanent magnet. FIG. 14 is acharacteristic diagram illustrating the magnetization curve of onemagnetic field generation unit 200. In each of FIG. 13 and FIG. 14, thehorizontal axis represents magnetic field, and the vertical axisrepresents magnetization. For both of the magnetic field and themagnetization, positive values represent magnitude in a predetermineddirection, while negative values represent magnitude in the oppositedirection from the predetermined direction. Arrows in the magnetizationcurves indicate the direction of a change in the magnetic field. Therange of the magnetic field indicated with the symbol HS represents therange of the target magnetic field.

The magnetic sensor system of the comparative example is used under thecondition that the strength of the target magnetic field does not exceedthe coercivity of the permanent magnet. However, a disturbance magneticfield having a strength exceeding the coercivity of the permanent magnetcan happen to be temporarily applied to the permanent magnet, becausethe magnetic sensor system can be used in various environments. Whensuch a disturbance magnetic field is temporarily applied to thepermanent magnet, the direction of the magnetization of the permanentmagnet may be changed from an original direction and then remaindifferent from the original direction even after the disturbancemagnetic field disappears. For example, as shown in FIG. 13, if adisturbance magnetic field of a positive value beyond the range HS ofthe target magnetic field is temporarily applied to the permanentmagnet, the direction of the magnetization of the permanent magnet ispinned in a positive direction after the disturbance magnetic fielddisappears. On the other hand, if a disturbance magnetic field of anegative value falling outside the range HS of the target magnetic fieldis temporarily applied to the permanent magnet, the direction of themagnetization of the permanent magnet is pinned in a negative directionafter the disturbance magnetic field disappears. Thus, in the magneticsensor of the comparative example, the direction of the magnetic fieldgenerated by the magnetic field generator may change from a desireddirection if a disturbance magnetic field having a strength exceedingthe coercivity of the permanent magnet is temporarily applied to thepermanent magnet.

In contrast, in the magnetic field generation unit 200 of the firstembodiment, as understood from FIG. 14, even if a disturbance magneticfield having a high strength sufficient to reverse the direction of themagnetization of the first ferromagnetic material section 220 istemporarily applied, the direction of the magnetization of the firstferromagnetic material section 220 returns to an original direction upondisappearance of such a disturbance magnetic field. Thus, the magneticfield generator 100 according to the first embodiment has high immunityto disturbance magnetic fields. This effect is enhanced by theconfiguration in which each of the magnetic field generation units 200includes a plurality of antiferromagnetic material sections, as in thefifth to eighth examples of the magnetic field generation units 200.

The magnetic field generator 100 according to the first embodiment canbe easily fabricated without the need for increasing the distancebetween two adjacent magnetic field generation units 200. The magneticfield generator 100 according to the first embodiment is fabricated by,for example, the following first or second method. The first method willbe described first. In the first method, a plurality of magnetic fieldgeneration units 200A (see FIG. 2) in which the magnetizations of thefirst ferromagnetic material sections 220 are set in the first directionD1 and a plurality of magnetic field generation units 200B (see FIG. 2)in which the magnetizations of the first ferromagnetic material sections220 are set in the second direction D2 are formed in separate steps. Theplurality of magnetic field generation units 200A are formed whileapplying a magnetic field in the first direction D1. The magnetizationof the first ferromagnetic material section 220 in each of the pluralityof magnetic field generation units 200A is thereby set in the firstdirection D1. In a like manner, the plurality of magnetic fieldgeneration units 200B are formed while applying a magnetic field in thesecond direction D2. The magnetization of the first ferromagneticmaterial section 220 in each of the plurality of magnetic fieldgeneration units 200B is thereby set in the second direction D2.

For example, a situation in which the step of forming the plurality ofmagnetic field generation units 200A precedes the step of forming theplurality of magnetic field generation units 200B will be considered. Inthis case, in the step of forming the plurality of magnetic fieldgeneration units 200B, the already formed plurality of magnetic fieldgeneration units 200A are subjected to the magnetic field in the seconddirection D2. This may temporarily reverse the direction of themagnetizations of the first ferromagnetic material sections 220 in theplurality of magnetic field generation units 200A. Even in such a case,the direction of the magnetizations of the first ferromagnetic materialsections 220 in the plurality of magnetic field generation units 200Areturns to the first direction D1 upon disappearance of the magneticfield in the second direction D2.

Next, the second method will be described. The second method first formsan initial magnetic field generator including a plurality of initialmagnetic field generation units in which the magnetizations of the firstferromagnetic material sections 220 are not set in a predetermineddirection. The plurality of initial magnetic field generation unitsinclude a plurality of first initial magnetic field generation unitsintended to be the plurality of magnetic field generation units 200A,and a plurality of second initial magnetic field generation unitsintended to be the plurality of magnetic field generation units 200B.

Next, while a magnetic field in the first direction D1 is applied toeach of the plurality of first initial magnetic field generation units,the temperature of each of the plurality of first initial magnetic fieldgeneration units is increased to a higher level than the blockingtemperature of the antiferromagnetic material section 210 included ineach of the plurality of first initial magnetic field generation units,and thereafter decreased. The magnetization of the first ferromagneticmaterial section 220 in each of the plurality of first initial magneticfield generation units is thereby set in the first direction D1, so thatthe plurality of first initial magnetic field generation units becomethe plurality of magnetic field generation units 200A.

Next, while a magnetic field in the second direction D2 is applied toeach of the plurality of second initial magnetic field generation units,the temperature of each of the plurality of second initial magneticfield generation units is increased to a higher level than the blockingtemperature of the antiferromagnetic material section 210 included ineach of the plurality of second initial magnetic field generation units,and thereafter decreased. The magnetization of the first ferromagneticmaterial section 220 in each of the plurality of second initial magneticfield generation units is thereby set in the second direction D2, sothat the plurality of second initial magnetic field generation unitsbecome the plurality of magnetic field generation units 200B. Note thatthe plurality of magnetic field generation units 200A may be formedafter the formation of the plurality of magnetic field generation units200B.

Both of the first and second methods make it possible to easily set thedirection of the magnetization of the first ferromagnetic materialsection 220 in each of two adjacent magnetic field generation units 200without the need for increasing the distance between the two adjacentmagnetic field generation units 200.

Thus, the first embodiment provides the magnetic field generator 100which includes the plurality of magnetic field generation units 200arranged in a desired pattern and which has high immunity to disturbancemagnetic fields. The first embodiment also provides the magnetic sensorsystem including the magnetic field generator 100. Further, according tothe first embodiment, a reduction in the distance between two adjacentmagnetic field generation units 200 serves to improve the resolution ofthe magnetic sensor system.

Second Embodiment

A second embodiment of the invention will now be described withreference to FIG. 15. FIG. 15 is a perspective view illustrating thegeneral configuration of a magnetic sensor system according to thesecond embodiment. The magnetic sensor system according to the secondembodiment differs from the first embodiment in the following ways. Themagnetic sensor system according to the second embodiment has a scale 2in place of the scale 1 of the first embodiment. The scale 2 is a rotaryscale of annular shape formed of a magnetic field generator 300according to the second embodiment. The magnetic field generator 300includes a plurality of magnetic field generation units 400 arranged ina predetermined pattern to generate a plurality of external magneticfields. The plurality of magnetic field generation units 400 areannularly arranged to form an aggregation having an outer periphery 300a and an inner periphery 300 b. The outer periphery 300 a is also theouter periphery of the magnetic field generator 300. The inner periphery300 b is also the inner periphery of the magnetic field generator 300.

The plurality of magnetic field generation units 400 each have a shapethat can be formed by, for example, equally cutting a thick cylinderinto N (N is an even number greater than or equal to 2) by one or moreplanes passing through a central axis C of the cylinder. FIG. 15 showsan example in which N, i.e., the number of the plurality of magneticfield generation units 400, is six.

The magnetic sensor 4 is placed to face the outer periphery 300 a. Thescale 2 rotates about the central axis C in a rotational direction D inresponse to a rotational movement of a moving object (not illustrated).The relative positional relationship between the scale 2 and themagnetic sensor 4 is thereby changed in the rotational direction D. Themagnetic sensor system detects a physical quantity associated with therelative positional relationship between the scale 2 and the magneticsensor 4. More specifically, the magnetic sensor system detects, as theaforementioned physical quantity, the rotational position and/or therotational speed of the aforementioned moving body moving with the scale2.

The plurality of magnetic field generation units 400 each have the sameinternal configuration as that of the plurality of the magnetic fieldgeneration units 200 of the first embodiment. More specifically, theplurality of magnetic field generation units 400 each include the firstferromagnetic material section and the first antiferromagnetic materialsection. The first ferromagnetic material section and the firstantiferromagnetic material section are stacked along a directionparallel to the central axis C. The remainder of configuration of themagnetic field generation units 400 is the same as that of any of thefirst to eighth examples of the magnetic field generation units 200described in relation to the first embodiment.

In FIG. 15, the hollow arrows indicate the directions of themagnetizations of the first ferromagnetic material sections. In FIG. 15,reference symbols 400A and 400B represent any two adjacent ones of theplurality of magnetic field generation units 400. As shown in FIG. 15,the two magnetic field generation units 400A and 400B are configured sothat the magnetizations of their respective first ferromagnetic materialsections are in different directions from each other. In the secondembodiment, in particular, the magnetization of the first ferromagneticmaterial section of the magnetic field generation unit 400A is in thedirection from the outer periphery 300 a to the inner periphery 300 b.The magnetization of the first ferromagnetic material section of themagnetic field generation unit 400B is in the direction from the innerperiphery 300 b to the outer periphery 300 a.

Here, the magnetization direction from the outer periphery 300 a to theinner periphery 300 b will be referred to as a first direction, and themagnetization direction from the inner periphery 300 b to the outerperiphery 300 a will be referred to as a second direction. In the secondembodiment, the plurality of magnetic field generation units 400 arearranged so that the directions of the magnetizations of the firstferromagnetic material sections alternate between the first directionand the second direction.

A change in the relative positional relationship between the scale 2 andthe magnetic sensor 4 causes a change in the direction of the targetmagnetic field for the magnetic sensor 4, that is, a magnetic field tobe applied to the magnetic sensor 4 on the basis of part of theplurality of external magnetic fields generated by the plurality ofmagnetic field generation units 400. In the example shown in FIG. 15,the direction of the target magnetic field rotates, within a planeorthogonal to the central axis C, about the location at which themagnetic sensor 4 is placed. In the example shown in FIG. 15, onerotation of the scale 2 causes the direction of the target magneticfield to rotate six times, that is, to change by six periods, inparticular.

The magnetic sensor 4 according to the second embodiment has the sameconfiguration as in the example of the first embodiment shown in FIG. 10and FIG. 11. Note that in second embodiment, the magnetic sensor 4 isplaced to face the outer periphery 300 a in such an orientation that theZ direction shown in FIG. 10 to FIG. 12 is parallel or almost parallelto a straight line drawn from the location of the magnetic sensor 4orthogonally to the central axis C, and the X direction shown in FIG. 10to FIG. 12 is parallel or almost parallel to a plane orthogonal to thecentral axis C.

The remainder of configuration, function and effects of the secondembodiment are similar to those of the first embodiment.

Third Embodiment

A third embodiment of the invention will now be described with referenceto FIG. 16. FIG. 16 is a perspective view illustrating the generalconfiguration of a magnetic sensor system of the third embodiment. Themagnetic sensor system of the third embodiment includes a scale 1, whichis a linear scale, and a magnetic sensor 5 according to the thirdembodiment. The positional relationship between the scale 1 and themagnetic sensor 5 and the relative movement of the scale 1 with respectto the magnetic sensor 5 are the same as the positional relationshipbetween the scale 1 and the magnetic sensor 4 in the first embodimentand the relative movement of the scale 1 with respect to the magneticsensor 4 in the first embodiment.

In the third embodiment, the scale 1 is formed of a magnetic fieldgenerator 500. The magnetic field generator 500 includes a plurality ofmagnetic field generation units 600 arranged in a predetermined patternto generate a plurality of external magnetic fields. In the thirdembodiment, the plurality of magnetic field generation units 600 arearranged in a row. The plurality of magnetic field generation units 600may have the same configuration as the plurality of magnetic fieldgeneration units 200 of the first embodiment. Alternatively, theplurality of magnetic field generation units 600 may each be formed of apermanent magnet. The magnetizations of the plurality of magnetic fieldgeneration units 600 are set in alternating directions.

The magnetic sensor 5 according to the third embodiment will now bedescribed with reference to FIG. 17 and FIG. 18. FIG. 17 is a circuitdiagram of the magnetic sensor 5. FIG. 18 is a cross-sectional view of apart of the magnetic sensor 5. The magnetic sensor 5 includes aplurality of magnetic detection elements for detecting a target magneticfield, and a bias magnetic field generator 8 for generating a pluralityof bias magnetic fields to be applied to the plurality of magneticdetection elements. In the third embodiment, each of the plurality ofmagnetic detection elements is an MR element.

The bias magnetic field generator 8 is formed of a magnetic fieldgenerator 9 according to the third embodiment. The magnetic fieldgenerator 9 includes a plurality of magnetic field generation unitsarranged in a predetermined pattern to generate a plurality of externalmagnetic fields. The plurality of magnetic field generation units of thethird embodiment have basically the same configuration as the pluralityof magnetic field generation units 200 of the first embodiment. Morespecifically, each of the plurality of magnetic field generation unitsof the third embodiment includes at least the first ferromagneticmaterial section and the first antiferromagnetic material section. Inthe third embodiment, the first ferromagnetic material section isdenoted by reference numeral 220 and the first antiferromagneticmaterial section is denoted by reference numeral 210, as in the firstembodiment. Each of the aforementioned plurality of bias magnetic fieldsresults from the magnetization of the first ferromagnetic materialsection 220 of at least one of the plurality of magnetic fieldgeneration units.

In the third embodiment, in particular, the plurality of MR elements ofthe magnetic sensor 5 include two MR elements 101 and 102 connected inseries, and two MR elements 111 and 112 connected in series. The MRelements 101 and 111 each correspond to the first magnetic detectionelement of the present invention. The MR elements 102 and 112 eachcorrespond to the second magnetic detection element of the presentinvention.

In the third embodiment, the plurality of magnetic field generationunits of the magnetic field generator 9 include two first magnetic fieldgeneration units 201 and 211 and two second magnetic field generationunits 202 and 212.

As shown in FIG. 18, the magnetic sensor 5 further includes a substrate51, two upper electrodes 33 and 34, and three lower electrodes 43, 44and 45. The lower electrodes 43, 44 and 45 are spaced from each otherand arranged in a row on the substrate 51. The MR element 101 lies on apart of the lower electrode 43 near an end thereof closest to the lowerelectrode 44. The MR element 102 lies on a part of the lower electrode44 near an end thereof closest to the lower electrode 43. The MR element111 lies on a part of the lower electrode 44 near an end thereof closestto the lower electrode 45. The MR element 112 lies on a part of thelower electrode 45 near an end thereof closest to the lower electrode44. The magnetic field generation units 201, 202, 211 and 212 lie on theMR elements 101, 102, 111 and 112, respectively. The upper electrode 33lies on the magnetic field generation units 201 and 22. The upperelectrode 34 lies on the magnetic field generation units 211 and 212.

The magnetic sensor 5 further includes insulating layers 52 and 53 and aprotective film 54. The insulating layer 52 lies on the substrate 51 andsurrounds the lower electrodes 43, 44 and 45. The insulating layer 53lies on the lower electrodes 43, 44 and 45 and the insulating layer 52and surrounds the MR elements 101, 102, 111 and 112 and the magneticfield generation units 201, 202, 211 and 212. The protective film 54 isprovided to cover the upper electrodes 33 and 34 and the insulatinglayer 53.

The magnetic sensor 5 includes a half-bridge circuit. The half-bridgecircuit includes a first row R1 of magnetic detection elements and asecond row R2 of magnetic detection elements connected in series. Asshown in FIG. 17, the first row R1 of magnetic detection elements isconstituted by the MR elements 101 and 102. The second row R2 ofmagnetic detection elements is constituted by the MR elements 111 and112. The magnetic sensor 5 further includes a power supply port V, aground port G, and an output port E. One end of the first row R1 ofmagnetic detection elements is connected to the power supply port V. Theother end of the first row R1 of magnetic detection elements isconnected to the output port E. One end of the second row R2 of magneticdetection elements is connected to the output port E. The other end ofthe second row R2 of magnetic detection elements is connected to theground port G.

A power supply voltage of a predetermined magnitude is applied to thepower supply port V. The ground port G is grounded. Each of the MRelements 101, 102, 111 and 112 varies in resistance depending on thetarget magnetic field. The resistances of the MR elements 101 and 102vary in phase with each other. The resistances of the MR elements 111and 112 vary 180° out of phase with the resistances of the MR elements101 and 102. The output port E outputs a detection signal correspondingto the potential at the connection point between the first row R1 ofmagnetic detection elements and the second row R2 of magnetic detectionelements, i.e., the connection point between the MR element 102 and theMR element 111. The detection signal varies depending on the targetmagnetic field. The output signal from the magnetic sensor 5 isgenerated by performing a predetermined computation using the detectionsignal. For example, the output signal from the magnetic sensor 5 isgenerated by adding a predetermined offset voltage to the detectionsignal. The output signal from the magnetic sensor 5 varies depending onthe target magnetic field.

Reference is now made to FIG. 19 to describe an example of theconfiguration of each of the MR elements 101, 102, 111 and 112 and eachof the magnetic field generation units 201, 202, 211 and 212. FIG. 19 isa side view illustrating the example of the configuration of each MRelement and each magnetic field generation unit. In the followingdescription, reference numerals 10, 20, 30, and 40 are used to representeach MR element, each magnetic field generation unit, each upperelectrode, and each lower electrode, respectively.

The MR element 10 has the same configuration as that in the firstembodiment. More specifically, the MR element 10 includes at least themagnetization pinned layer 13, the free layer 15, and the nonmagneticlayer 14. In the example shown in FIG. 19, the MR element 10 furtherincludes the underlayer 11, the antiferromagnetic layer 12 and theprotective layer 16. In this example, the underlayer 11, theantiferromagnetic layer 12, the magnetization pinned layer 13, thenonmagnetic layer 14, the free layer 15 and the protective layer 16 arestacked in this order along the Z direction, the underlayer 11 beingclosest to the lower electrode 40.

The magnetic field generation unit 20 includes at least the firstferromagnetic material section 220 and the first antiferromagneticmaterial section 210. In the example shown in FIG. 19, the firstantiferromagnetic material section 210 and the first ferromagneticmaterial section 220 are stacked in this order along the Z direction,the first antiferromagnetic material section 210 being closer to the MRelement 10. In the example shown in FIG. 19, the magnetic fieldgeneration unit 20 has the configuration of the first example of themagnetic field generation unit 200 described in relation to the firstembodiment. However, the magnetic field generation unit 20 may have theconfiguration of any of the second to eighth examples of the magneticfield generation units 200 described in relation to the firstembodiment.

Reference is now made to FIG. 17 to describe the magnetizationdirections of the magnetization pinned layers 13 of the MR elements 101,102, 111 and 112. In FIG. 17, the filled arrows in the MR elements 101,102, 111 and 112 indicate the magnetization directions of themagnetization pinned layers 13 of the MR elements 101, 102, 111 and 112.Now, a third direction D3 and a fourth direction D4 will be defined asshown in FIG. 17. The definitions of the third and fourth directions D3and D4 are the same as in the first embodiment. In FIG. 17, the thirddirection D3 is rightward. The fourth direction D4 is opposite to thethird direction D3.

As shown in FIG. 17, the magnetization pinned layers 13 of the MRelements 101 and 102 are magnetized in the third direction D3, and themagnetization pinned layers 13 of the MR elements 111 and 112 aremagnetized in the fourth direction D4. In this case, the potential atthe connection point between the MR elements 102 and 111 variesdepending on the strength of the component of the target magnetic fieldin the direction parallel to the third and fourth directions D3 and D4,i.e., the X-directional component of the target magnetic field. Theoutput port E outputs a detection signal corresponding to the potentialat the connection point between the MR elements 102 and 111. Thedetection signal represents the strength of the X-directional componentof the target magnetic field.

In consideration of the production accuracy of the MR elements and otherfactors, the magnetization directions of the magnetization pinned layers13 of the MR elements 101, 102, 111 and 112 may be slightly differentfrom the above-described directions.

Now, the directions of the magnetizations of the first ferromagneticmaterial sections 220 of the magnetic field generation units 201, 202,211 and 212 and the bias magnetic fields to be applied to the MRelements 101, 102, 111 and 112 will be described with reference to FIG.17. In FIG. 17, the arrows drawn in chain double-dashed lines in themagnetic field generation units 201, 202, 211 and 212 indicate thedirections of the magnetizations of the first ferromagnetic materialsections 220 of the magnetic field generation units 201, 202, 211 and212.

Now, a fifth direction D5 and a sixth direction D6 will be defined asshown in FIG. 17. In the third embodiment, each of the fifth and sixthdirections D5 and D6 is one particular direction parallel to the Ydirection. In FIG. 17, the fifth direction D5 is upward. The sixthdirection D6 is opposite to the fifth direction D5. In the thirdembodiment, in particular, the magnetizations of the first ferromagneticmaterial sections 220 of the magnetic field generation units 201 and 211are in the fifth direction D5. The magnetizations of the firstferromagnetic material sections 220 of the magnetic field generationunits 202 and 212 are in the sixth direction D6.

The magnetic sensor 5 includes a pair of first and second magnetic fieldgeneration unit aggregations provided in correspondence with a singlehalf-bridge circuit. The first magnetic field generation unitaggregation includes the magnetic field generation units 201 and 202,and generates two bias magnetic fields to be applied to the MR elements101 and 102 which constitute the first row R1 of magnetic detectionelements. The second magnetic field generation unit aggregation includesthe magnetic field generation units 211 and 212, and generates two biasmagnetic fields to be applied to the MR elements 111 and 112 whichconstitute the second row R2 of magnetic detection elements.

The bias magnetic field to be applied to the MR element 101 results fromthe magnetization of the first ferromagnetic material section 220 of themagnetic field generation unit 201. The bias magnetic field to beapplied to the MR element 102 results from the magnetization of thefirst ferromagnetic material section 220 of the magnetic fieldgeneration unit 202. The main component of the bias magnetic field atthe location of the MR element 101 is in the sixth direction D6, i.e.,the opposite direction to the direction of the magnetization of thefirst ferromagnetic material section 220 of the magnetic fieldgeneration unit 201. The main component of the bias magnetic field atthe location of the MR element 102 is in the fifth direction D5, i.e.,the opposite direction to the direction of the magnetization of thefirst ferromagnetic material section 220 of the magnetic fieldgeneration unit 202.

The direction of the magnetization of the first ferromagnetic materialsection 220 of the magnetic field generation unit 201, i.e., the fifthdirection D5, intersects the direction of the magnetization of themagnetization pinned layer 13 of the MR element 101, i.e., the thirddirection D3. The direction of the magnetization of the firstferromagnetic material section 220 of the magnetic field generation unit202, i.e., the sixth direction D6, intersects the direction of themagnetization of the magnetization pinned layer 13 of the MR element102, i.e., the third direction D3.

The bias magnetic field to be applied to the MR element 111 results fromthe magnetization of the first ferromagnetic material section 220 of themagnetic field generation unit 211. The bias magnetic field to beapplied to the MR element 112 results from the magnetization of thefirst ferromagnetic material section 220 of the magnetic fieldgeneration unit 212. The main component of the bias magnetic field atthe location of the MR element 111 is in the sixth direction D6, i.e.,the opposite direction to the direction of the magnetization of thefirst ferromagnetic material section 220 of the magnetic fieldgeneration unit 211. The main component of the bias magnetic field atthe location of the MR element 112 is in the fifth direction D5, i.e.,the opposite direction to the direction of the magnetization of thefirst ferromagnetic material section 220 of the magnetic fieldgeneration unit 212.

The direction of the magnetization of the first ferromagnetic materialsection 220 of the magnetic field generation unit 211, i.e., the fifthdirection D5, intersects the direction of the magnetization of themagnetization pinned layer 13 of the MR element 111, i.e., the fourthdirection D4. The direction of the magnetization of the firstferromagnetic material section 220 of the magnetic field generation unit212, i.e., the sixth direction D6, intersects the direction of themagnetization of the magnetization pinned layer 13 of the MR element112, i.e., the fourth direction D4.

The bias magnetic field is used to make the free layer 15 have a singlemagnetic domain and to orient the magnetization of the free layer 15 ina certain direction, when the strength of the component of the targetmagnetic field in the direction parallel to the magnetization directionof the pinned layer 13, that is, the X-directional component of thetarget magnetic field, is zero.

In the third embodiment, the magnetic field generation units 201 and202, which constitute the first magnetic field generation unitaggregation, are configured so that the magnetizations of theirrespective first ferromagnetic material sections 220 are in differentdirections from each other. In the third embodiment, in particular, themagnetic field generation units 201 and 202 are configured so that themain component of the bias magnetic field to be applied to the MRelement 101 and the main component of the bias magnetic field to beapplied to the MR element 102 are in mutually opposite directions. Thus,according to the third embodiment, the effect of the bias magnetic fieldon the sensitivity and the like of the MR element 101 and the effect ofthe bias magnetic field on the sensitivity and the like of the MRelement 102 cancel each other out in the first row R1 of magneticdetection elements. As a result, the third embodiment makes it possibleto prevent the characteristics of the first row R1 of magnetic detectionelements from differing from desired characteristics due to the biasmagnetic fields.

Likewise, in the third embodiment, the magnetic field generation units211 and 212, which constitute the second magnetic field generation unitaggregation, are configured so that the magnetizations of theirrespective first ferromagnetic material sections 220 are in differentdirections from each other. In the third embodiment, in particular, themagnetic field generation units 211 and 212 are configured so that themain component of the bias magnetic field to be applied to the MRelement 111 and the main component of the bias magnetic field to beapplied to the MR element 112 are in mutually opposite directions. Thus,according to the third embodiment, the effect of the bias magnetic fieldon the sensitivity and the like of the MR element 111 and the effect ofthe bias magnetic field on the sensitivity and the like of the MRelement 112 cancel each other out in the second row R2 of magneticdetection elements. As a result, the third embodiment makes it possibleto prevent the characteristics of the second row R2 of magneticdetection elements from differing from desired characteristics due tothe bias magnetic fields.

The magnetic field generator 9 according to the third embodiment can befabricated by the same method as the magnetic field generator 100according to the first embodiment. As described in relation to the firstembodiment, the direction of the magnetization of the firstferromagnetic material section 220 of each of two adjacent magneticfield generation units can be easily set without the need for increasingthe distance between the two adjacent magnetic field generation units.According to the third embodiment, it is possible to provide themagnetic field generator 9 which includes the magnetic field generationunits 201, 202, 211 and 212 arranged in a desired pattern and which hashigh immunity to disturbance magnetic fields, and to provide themagnetic sensor 5 including the magnetic field generator 9. Further,according to the third embodiment, a reduction in the distance betweentwo adjacent magnetic field generation units serves to improveflexibility in the arrangement of the magnetic field generation units201, 202, 211 and 212 and reduce the area to be occupied of the magneticfield generation units 201, 202, 211 and 212.

Modification Example

A modification example of the magnetic sensor system of the thirdembodiment will now be described with reference to FIG. 20. FIG. 20 is aperspective view illustrating the general configuration of themodification example of the magnetic sensor system of the thirdembodiment. In the modification example, the magnetic sensor system hasa scale 2, which is a rotary scale of annular shape, instead of thescale 1 shown in FIG. 16. The positional relationship between the scale2 and the magnetic sensor 5 and the relative movement of the scale 2with respect to the magnetic sensor 5 are the same as the positionalrelationship between the scale 2 and the magnetic sensor 4 in the secondembodiment and the relative movement of the scale 2 with respect to themagnetic sensor 4 in the second embodiment.

The scale 2 is formed of a magnetic field generator 700. The magneticfield generator 200 includes a plurality of magnetic field generationunits 800 arranged in a predetermined pattern to generate a plurality ofexternal magnetic fields. In the modification example, the plurality ofmagnetic field generation units 800 are annularly arranged to form anaggregation having an outer periphery and an inner periphery, like theplurality of magnetic field generation units 400 of the secondembodiment. In the example shown in FIG. 20, the number of the pluralityof magnetic field generation units 800 is six. The plurality of magneticfield generation units 800 each have the same internal configuration asthat of the plurality of the magnetic field generation units 600 shownin FIG. 16.

The remainder of configuration, function and effects of the thirdembodiment are similar to those of the first or second embodiment.

Fourth Embodiment

A fourth embodiment of the invention will now be described withreference to FIG. 21 and FIG. 22. FIG. 21 is a circuit diagram of amagnetic sensor according to the fourth embodiment. FIG. 22 is across-sectional view of the magnetic sensor according to the fourthembodiment. The magnetic sensor 5 according to the fourth embodimentdiffers from the magnetic sensor according to the third embodiment inthe following ways. In the magnetic sensor 5 according to the fourthembodiment, the plurality of magnetic field generation units of the biasmagnetic field generator 8 (the magnetic field generator 9) include twofirst magnetic field generation units 201 and 211, two second magneticfield generation units 202 and 212, two third magnetic field generationunits 203 and 213, and two fourth magnetic field generation units 204and 214.

As shown in FIG. 22, the magnetic field generation units 201 and 202 areembedded in the insulating layer 53. As shown in FIG. 21 and FIG. 22,the magnetic field generation units 201 and 202 are located at apredetermined distance from each other along the Y direction with the MRelement 101 interposed therebetween. Similarly, the magnetic fieldgeneration units 203, 204 and 211 to 214 are embedded in the insulatinglayer 53. The magnetic field generation units 203 and 204 are located ata predetermined distance from each other along the Y direction with theMR element 102 interposed therebetween. The magnetic field generationunits 211 and 212 are located at a predetermined distance from eachother along the Y direction with the MR element 111 interposedtherebetween. The magnetic field generation units 213 and 214 arelocated at a predetermined distance from each other along the Ydirection with the MR element 112 interposed therebetween.

As shown in FIG. 21, the magnetic field generation units 201 and 203 areadjacent to each other in the X direction. The magnetic field generationunits 202 and 204 are adjacent to each other in the X direction. Themagnetic field generation units 211 and 213 are adjacent to each otherin the X direction. The magnetic field generation units 212 and 214 areadjacent to each other in the X direction.

In the fourth embodiment, the upper electrode 33 lies on the MR elements101 and 102. The upper electrode 34 (see FIG. 18) lies on the MRelements 111 and 112.

An example of the configuration of the magnetic field generation units201 to 204 and 211 to 214 will now be described with reference to FIG.22. As shown in FIG. 22, each of the magnetic field generation units 201and 202 includes at least the first ferromagnetic material section 220and the first antiferromagnetic material section 210. FIG. 22 shows anexample in which the first antiferromagnetic material section 210 andthe first ferromagnetic material section 220 are stacked along the Zdirection. In the example shown in FIG. 22, the magnetic fieldgeneration units 201 and 202 have the configuration of the first exampleof the magnetic field generation units 200 described in relation to thefirst embodiment. However, the magnetic field generation units 201 and202 may have the configuration of any of the second to eighth examplesof the magnetic field generation units 200 described in relation to thefirst embodiment.

Although not illustrated, the magnetic field generation units 203, 204and 211 to 214 have the same configuration as the magnetic fieldgeneration units 201 and 202. The above descriptions concerning themagnetic field generation units 201 and 202 hold true for the magneticfield generation units 203, 204 and 211 to 214.

Now, the directions of the magnetizations of the first ferromagneticmaterial sections 220 of the magnetic field generation units 201 to 204and 211 to 214 and the bias magnetic fields to be applied to the MRelements 101, 102, 111 and 112 will be described with reference to FIG.21. In FIG. 21, the hollow arrows in the magnetic field generation units201 to 204 and 211 to 214 indicate the directions of the magnetizationsof the first ferromagnetic material sections 220 of the magnetic fieldgeneration units 201 to 204 and 211 to 214.

Now, a fifth direction D5 and a sixth direction D6 will be defined asshown in FIG. 21. The definitions of the fifth and sixth directions D5and D6 are the same as in the third embodiment. In FIG. 21, the fifthdirection D5 is upward. The sixth direction D6 is opposite to the fifthdirection D5. The magnetizations of the first ferromagnetic materialsections 220 of the magnetic field generation units 201, 202, 211 and212 are in the fifth direction D5. The magnetizations of the firstferromagnetic material sections 220 of the magnetic field generationunits 203, 204, 213 and 214 are in the sixth direction D6.

In the fourth embodiment, the magnetic sensor 5 includes a pair of firstand second magnetic field generation unit aggregations provided incorrespondence with a single half-bridge circuit, as in the thirdembodiment. In the fourth embodiment, the first magnetic fieldgeneration unit aggregation includes a first group of first to fourthmagnetic field generation units 201 to 204, and generates two biasmagnetic fields to be applied to the MR elements 101 and 102 whichconstitute the first row R1 of magnetic detection elements. The secondmagnetic field generation unit aggregation includes a second group offirst to fourth magnetic field generation units 211 to 214, andgenerates two bias magnetic fields to be applied to the MR elements 111and 112 which constitute the second row R2 of magnetic detectionelements.

The bias magnetic field to be applied to the MR element 101 results fromthe magnetization of the first ferromagnetic material section 220 of themagnetic field generation unit 201 and the magnetization of the firstferromagnetic material section 220 of the magnetic field generation unit202. The bias magnetic field to be applied to the MR element 102 resultsfrom the magnetization of the first ferromagnetic material section 220of the magnetic field generation unit 203 and the magnetization of thefirst ferromagnetic material section 220 of the magnetic fieldgeneration unit 204. The main component of the bias magnetic field atthe location of the MR element 101 is in the fifth direction D5, i.e.,the same direction as the magnetizations of the first ferromagneticmaterial sections 220 of the magnetic field generation units 201 and202. The main component of the bias magnetic field at the location ofthe MR element 102 is in the sixth direction D6, i.e., the samedirection as the magnetizations of the first ferromagnetic materialsections 220 of the magnetic field generation units 203 and 204.

The magnetization pinned layers 13 of the MR elements 101 and 102 aremagnetized in the same direction as those of the third embodiment. Now,third and fourth directions D3 and D4 will be defined as shown in FIG.21. The definitions of the third and fourth directions D3 and D4 are thesame as in the third embodiment. In FIG. 21, the third direction D3 isrightward. The fourth direction D4 is opposite to the third directionD3. As shown in FIG. 21, the magnetization pinned layers 13 of the MRelements 101 and 102 are magnetized in the third direction D3. Thedirection of the magnetizations of the first ferromagnetic materialsections 220 of the magnetic field generation units 201 and 202, i.e.,the fifth direction D5, intersects the direction of the magnetization ofthe magnetization pinned layer 13 of the MR element 101, i.e., the thirddirection D3. The direction of the magnetizations of the firstferromagnetic material sections 220 of the magnetic field generationunits 203 and 204, i.e., the sixth direction D6, intersects thedirection of the magnetization of the magnetization pinned layer 13 ofthe MR element 102, i.e., the third direction D3.

The bias magnetic field to be applied to the MR element 111 results fromthe magnetization of the first ferromagnetic material section 220 of themagnetic field generation unit 211 and the magnetization of the firstferromagnetic material section 220 of the magnetic field generation unit212. The bias magnetic field to be applied to the MR element 112 resultsfrom the magnetization of the first ferromagnetic material section 220of the magnetic field generation unit 213 and the magnetization of thefirst ferromagnetic material section 220 of the magnetic fieldgeneration unit 214. The main component of the bias magnetic field atthe location of the MR element 111 is in the fifth direction D5, i.e.,the same direction as the magnetizations of the first ferromagneticmaterial sections 220 of the magnetic field generation units 211 and212. The main component of the bias magnetic field at the location ofthe MR element 112 is in the sixth direction D6, i.e., the samedirection as the magnetizations of the first ferromagnetic materialsections 220 of the magnetic field generation units 213 and 214.

The magnetization pinned layers 13 of the MR elements 111 and 112 aremagnetized in the same direction as those of the third embodiment. Asshown in FIG. 21, the magnetization pinned layers 13 of the MR elements111 and 112 are magnetized in the fourth direction D4. The direction ofthe magnetizations of the first ferromagnetic material sections 220 ofthe magnetic field generation units 211 and 212, i.e., the fifthdirection D5, intersects the direction of the magnetization of themagnetization pinned layer 13 of the MR element 111, i.e., the fourthdirection D4. The direction of the magnetizations of the firstferromagnetic material sections 220 of the magnetic field generationunits 213 and 214, i.e., the sixth direction D6, intersects thedirection of the magnetization of the magnetization pinned layer 13 ofthe MR element 112, i.e., the fourth direction D4.

In the fourth embodiment, the magnetic field generation units 201 and203 are adjacent to each other and configured so that the magnetizationsof their respective first ferromagnetic material sections 220 are indifferent directions from each other. The magnetic field generationunits 202 and 204 are adjacent to each other and configured so that themagnetizations of their respective first ferromagnetic material sections220 are in different directions from each other. In the fourthembodiment, in particular, the magnetic field generation units 201 to204 are configured so that the main component of the bias magnetic fieldto be applied to the MR element 101 and the main component of the biasmagnetic field to be applied to the MR element 102 are in mutuallyopposite directions. Thus, according to the fourth embodiment, theeffect of the bias magnetic field on the sensitivity and the like of theMR element 101 and the effect of the bias magnetic field on thesensitivity and the like of the MR element 102 cancel each other out inthe first row R1 of magnetic detection elements. As a result, the fourthembodiment makes it possible to prevent the characteristics of the firstrow R1 of magnetic detection elements from differing from desiredcharacteristics due to the bias magnetic fields.

Likewise, in the fourth embodiment, the magnetic field generation units211 and 213 are adjacent to each other and configured so that themagnetizations of their respective first ferromagnetic material sections220 are in different directions from each other. The magnetic fieldgeneration units 212 and 214 are adjacent to each other and configuredso that the magnetizations of their respective first ferromagneticmaterial sections 220 are in different directions from each other. Inthe fourth embodiment, in particular, the magnetic field generationunits 211 to 214 are configured so that the main component of the biasmagnetic field to be applied to the MR element 111 and the maincomponent of the bias magnetic field to be applied to the MR element 112are in mutually opposite directions. Thus, according to the fourthembodiment, the effect of the bias magnetic field on the sensitivity andthe like of the MR element 111 and the effect of the bias magnetic fieldon the sensitivity and the like of the MR element 112 cancel each otherout in the second row R2 of magnetic detection elements. As a result,the fourth embodiment makes it possible to prevent the characteristicsof the second row R2 of magnetic detection elements from differing fromdesired characteristics due to the bias magnetic fields.

The magnetic field generator 9 according to the fourth embodiment can befabricated by the same method as the magnetic field generator 100according to the first embodiment. As described in relation to the firstembodiment, the direction of the magnetization of the firstferromagnetic material section 220 of each of two adjacent magneticfield generation units can be easily set without the need for increasingthe distance between the two adjacent magnetic field generation units.According to the fourth embodiment, it is possible to provide themagnetic field generator 9 which includes the magnetic field generationunits 201 to 204 and 211 to 214 arranged in a desired pattern and whichhas high immunity to disturbance magnetic fields, and to provide themagnetic sensor 5 including the magnetic field generator 9. Further,according to the fourth embodiment, a reduction in the distance betweentwo adjacent magnetic field generation units serves to improveflexibility in the arrangement of the magnetic field generation units201 to 204 and 211 to 214 and reduce the area to be occupied of themagnetic field generation units 201 to 204 and 211 to 214.

The magnetic sensor system of the fourth embodiment may include thescale 1 of the third embodiment shown in FIG. 16 or the scale 2 of thethird embodiment shown in FIG. 20. The remainder of configuration,function and effects of the fourth embodiment are similar to those ofthe third embodiment.

Fifth Embodiment

A fifth embodiment of the invention will now be described with referenceto FIG. 23. FIG. 23 is a circuit diagram of a magnetic sensor accordingto the fifth embodiment. The magnetic sensor 5 according to the fifthembodiment differs from the magnetic sensor according to the fourthembodiment in the following ways. In the fifth embodiment, as shown inFIG. 23, the directions of the magnetizations of the first ferromagneticmaterial sections 220 of the magnetic field generation units 201 to 204and 211 to 214 are all inclined with respect to both of the X and Ydirections.

Now, a seventh direction and an eighth direction will be defined withrespect to the sixth direction D6 shown in FIG. 23. The sixth directionD6 has been defined in relation to the fourth embodiment. In FIG. 23,the sixth direction D6 is downward. The seventh direction is thedirection rotated clockwise from the sixth direction D6 by a firstangle. The eighth direction is the direction rotated counterclockwisefrom the sixth direction D6 by a second angle. The first and secondangles are greater than 0° and smaller than 90°. In FIG. 23 the seventhdirection is toward the lower left. The eighth direction is toward thelower right. The magnetizations of the first ferromagnetic materialsections 220 of the magnetic field generation units 201, 202, 211 and212 are in the seventh direction. The magnetizations of the firstferromagnetic material sections 220 of the magnetic field generationunits 203, 204, 213 and 214 are in the eighth direction. The first angleand the second angle are preferably equal.

In the fifth embodiment, both of the bias magnetic fields to be appliedto the MR elements 101 and 102 result from the magnetizations of thefour first ferromagnetic material sections 220 of the magnetic fieldgeneration units 201 to 204. In FIG. 23, the the arrows drawn in chaindouble-dashed lines in the vicinity of the MR elements 101 and 102indicate the direction of the main components of the bias magneticfields at the locations of the MR elements 101 and 102. In the fifthembodiment, in particular, the magnetization of each of the four firstferromagnetic material sections 220 of the magnetic field generationunits 201 to 204 is set in such a direction that the main components ofthe bias magnetic fields at the locations of the MR elements 101 and 102are oriented in the sixth direction D6.

On the other hand, both of the bias magnetic fields to be applied to theMR elements 111 and 112 result from the magnetizations of the four firstferromagnetic material sections 220 of the magnetic field generationunits 211 to 214. In FIG. 23, the the arrows drawn in chaindouble-dashed lines in the vicinity of the MR elements 111 and 112indicate the direction of the main components of the bias magneticfields at the locations of the MR elements 111 and 112. In the fifthembodiment, in particular, the magnetization of each of the four firstferromagnetic material sections 220 of the magnetic field generationunits 211 to 214 is set in such a direction that the main components ofthe bias magnetic fields at the locations of the MR elements 111 and 112are oriented in the sixth direction D6.

In general, the sensitivity of an MR element and the strength range of atarget magnetic field for the MR element are traded off and adjusted asneeded. The sensitivity of the MR element and the strength range of thetarget magnetic field can be adjusted by the magnitude of a biasmagnetic field to be applied to the MR element. In the fifth embodiment,the magnitude of the bias magnetic fields to be applied to the MRelements 101, 102, 111 and 112 is easily adjustable by, for example,adjusting the first and second angles. The fifth embodiment thus makesit possible to easily adjust the sensitivity of the MR elements 101,102, 111 and 112 and the strength range of the target magnetic fieldsfor the MR elements 101, 102, 111 and 112.

The remainder of configuration, function and effects of the fifthembodiment are similar to those of the fourth embodiment.

Sixth Embodiment

A sixth embodiment of the invention will now be described with referenceto FIG. 24. FIG. 24 is a circuit diagram illustrating the circuitconfiguration of a magnetic sensor system of the sixth embodiment. Themagnetic sensor system of the sixth embodiment includes a first magneticsensor 5A and a second magnetic sensor 5B according to the sixthembodiment, and is configured to detect the direction and magnitude of atarget magnetic field. In the sixth embodiment, the target magneticfield is the earth's magnetic field or a magnetic field generated by anymagnet, for example.

Each of the first and second magnetic sensors 5A and 5B has the sameconfiguration as that of the magnetic sensor 5 according to the fourthembodiment. The arrangement of the MR elements 101, 102, 111 and 112 andthe magnetic field generation units 201 to 204 and 211 to 214, thedirections of the magnetizations of the magnetization pinned layers 13of the MR elements 101, 102, 111 and 112, the directions of themagnetizations of the first ferromagnetic material sections 220 of themagnetic field generation units 201 to 204 and 211 to 214, and thedirections of the bias magnetic fields to be applied to the MR elements101, 102, 111 and 112 in the first magnetic sensor 5A are the same asthose in the fourth embodiment.

The MR elements 101, 102, 111 and 112 and the magnetic field generationunits 201 to 204 and 211 to 214 of the second magnetic sensor 5B areplaced in such an orientation that the MR elements 101, 102, 111 and 112and the magnetic field generation units 201 to 204 and 211 to 214 of thefirst magnetic sensor 5A are rotated counterclockwise by 90° in an XYplane. Thus, the magnetization pinned layers 13 of the MR elements 101,102, 111 and 112 of the second magnetic sensor 5B have magnetizationdirections that are rotated counterclockwise by 90° in the XY plane fromthe magnetization directions of the magnetization pinned layers 13 ofthe MR elements 101, 102, 111 and 112 of the first magnetic sensor 5A.Likewise, the first ferromagnetic material sections 220 of the magneticfield generation units 201 to 204 and 211 to 214 of the second magneticsensor 5B have magnetization directions that are rotatedcounterclockwise by 90° in the XY plane from the magnetizationdirections of the first ferromagnetic material sections 220 of themagnetic field generation units 201 to 204 and 211 to 214 of the firstmagnetic sensor 5A. Therefore, the bias magnetic fields to be applied tothe MR elements 101, 102, 111 and 112 of the second magnetic sensor 5Bare in directions that are rotated counterclockwise by 90° in the XYplane from the directions of the bias magnetic fields to be applied tothe MR elements 101, 102, 111 and 112 of the first magnetic sensor 5A.

The output port E of the first magnetic sensor 5A outputs a firstdetection signal corresponding to the potential at the connection pointbetween the MR elements 102 and 111 in the first magnetic sensor 5A. Inthe first magnetic sensor 5A, the potential at the connection pointbetween the MR elements 102 and 111 varies depending on the strength ofthe X-directional component of the target magnetic field. The firstdetection signal represents the strength of the X-directional componentof the target magnetic field.

The output port E of the second magnetic sensor 5B outputs a seconddetection signal corresponding to the potential at the connection pointbetween the MR elements 102 and 111 in the second magnetic sensor 5B. Inthe second magnetic sensor 5B, the potential at the connection pointbetween the MR elements 102 and 111 varies depending on the strength ofa component of the target magnetic field in the Y direction(hereinafter, “Y-directional component of the target magnetic field”).The second detection signal represents the strength of the Y-directionalcomponent of the target magnetic field.

The magnetic sensor system of the sixth embodiment further includes acomputing unit 7. The computing unit 7 has two inputs and an output. Thetwo inputs of the computing unit 7 are connected to the respectiveoutput ports E of the first and second magnetic sensors 5A and 5B. Onthe basis of the first and second detection signals, the computing unit7 computes an output signal that represents the direction and/ormagnitude of the target magnetic field. The computing unit 7 can beimplemented by a microcomputer, for example.

The first and second magnetic sensors 5A and 5B may each include a biasmagnetic field generator formed of the magnetic field generator 9according to the third embodiment, instead of the bias magnetic fieldgenerator formed of the magnetic field generator 9 according to thefourth embodiment. The remainder of configuration, function and effectsof the sixth embodiment are similar to those of the third or fourthembodiment.

Seventh Embodiment

A seventh embodiment of the invention will now be described withreference to FIG. 25. FIG. 25 is a circuit diagram illustrating thecircuit configuration of a magnetic sensor system of the seventhembodiment. The magnetic sensor system of the seventh embodiment differsfrom that of the sixth embodiment in the following ways. The magneticsensor system of the seventh embodiment includes a first magnetic sensor6A and a second magnetic sensor 6B instead of the first magnetic sensor5A and the second magnetic sensor 5B of the sixth embodiment. The firstand second magnetic sensors 6A and 6B each include a plurality of MRelements, like the first and second magnetic sensors 5A and 5B.

The plurality of MR elements of the first magnetic sensor 6A include twoMR elements 101 and 102 connected in series, two MR elements 111 and 112connected in series, two MR elements 103 and 104 connected in series,and two MR elements 113 and 114 connected in series. The MR elements101, 103, 111 and 113 each correspond to the first magnetic detectionelement of the present invention. The MR elements 102, 104, 112 and 114each correspond to the second magnetic detection element of the presentinvention. The MR elements 101 to 104 and 111 to 114 each have the sameconfiguration as that of the MR element 10 of the first embodiment.

The first magnetic sensor 6A includes a bias magnetic field generatorformed of a magnetic field generator including a plurality of magneticfield generation units. The plurality of magnetic field generation unitsin the first magnetic sensor 6A include four first magnetic fieldgeneration units 201, 205, 211 and 215, four second magnetic fieldgeneration units 202, 206, 212 and 216, four third magnetic fieldgeneration units 203, 207, 213 and 217, and four fourth magnetic fieldgeneration units 204, 208, 214 and 218. The magnetic field generationunits 201 to 204 and 211 to 214 have the same configuration as themagnetic field generation units 201 to 204 and 211 to 214 of the sixthembodiment. Likewise, the magnetic field generation units 205 to 208 and215 to 218 also have the same configuration as the magnetic fieldgeneration units 201 to 204 and 211 to 214 of the sixth embodiment.

The first magnetic sensor 6A includes a first region in which the MRelements 101, 102, 111 and 112 and the magnetic field generation units201 to 204 and 211 to 214 are located, and a second region in which theMR elements 103, 104, 113 and 114 and the magnetic field generationunits 205 to 208 and 215 to 218 are located. FIG. 25 shows an example inwhich the first region and the second region are at locations differentfrom each other in the Y direction.

The arrangement of the MR elements 101, 102, 111 and 112 and themagnetic field generation units 201 to 204 and 211 to 214 are the sameas the arrangement of the MR elements 101, 102, 111 and 112 and themagnetic field generation units 201 to 204 and 211 to 214 in the firstmagnetic sensor 5A described in relation to the sixth embodiment. Thearrangement of the MR elements 103, 104, 113 and 114 and the magneticfield generation units 205 to 208 and 215 to 218 are the same as thearrangement of the MR elements 101, 102, 111 and 112 and the magneticfield generation units 201 to 204 and 211 to 214, except that theirlocations are different in the Y direction.

The directions of the magnetizations of the magnetization pinned layers13 of the MR elements 101, 101, 111 and 112, the directions of themagnetizations of the first ferromagnetic material sections 220 of themagnetic field generation units 201 to 204 and 211 to 214, and thedirections of the bias magnetic fields to be applied to the MR elements101, 102, 111 and 112 are the same as those in the first magnetic sensor5A described in relation to the sixth embodiment.

The directions of the magnetizations of the magnetization pinned layers13 of the MR elements 103, 104, 113 and 114 are opposite to those of themagnetization pinned layers 13 of the MR elements 101, 102, 111 and 112.The directions of the magnetizations of the first ferromagnetic materialsections 220 of the magnetic field generation units 205 to 208 and 215to 218 and the directions of the bias magnetic fields to be applied tothe MR elements 103, 104, 113 and 114 are the same as the directions ofthe magnetizations of the first ferromagnetic material sections 220 ofthe magnetic field generation units 201 to 204 and 211 to 214 and thedirections of the bias magnetic fields to be applied to the MR elements101, 101, 111 and 112.

The first magnetic sensor 6A includes a first half-bridge circuit and asecond half-bridge circuit. Each of the first and second half-bridgecircuits includes a first row of magnetic detection elements and asecond row of magnetic detection elements connected in series. The firstrow of magnetic detection elements of the first half-bridge circuit isconstituted by the MR elements 101 and 102. The second row of magneticdetection elements of the first half-bridge circuit is constituted bythe MR elements 111 and 112. The first row of magnetic detectionelements of the second half-bridge circuit is constituted by the MRelements 103 and 104. The second row of magnetic detection elements ofthe second half-bridge circuit is constituted by the MR elements 113 and114. The MR elements 101 to 104 and 111 to 114 constitute a Wheatstonebridge circuit.

The first magnetic sensor 6A further includes a power supply port V, aground port G, a first output port E1 and a second output port E2. Inthe first half-bridge circuit, one end of the first row of magneticdetection elements is connected to the power supply port V. The otherend of the first row of magnetic detection elements is connected to thefirst output port E1. One end of the second row of magnetic detectionelements is connected to the first output port E1. The other end of thesecond row of magnetic detection elements is connected to the groundport G.

In the second half-bridge circuit, one end of the first row of magneticdetection elements is connected to the power supply port V. The otherend of the first row of magnetic detection elements is connected to thesecond output port E2. One end of the second row of magnetic detectionelements is connected to the second output port E2. The other end of thesecond row of magnetic detection elements is connected to the groundport G.

A power supply voltage of a predetermined magnitude is applied to thepower supply port V. The ground port G is grounded. Each of the MRelements 101 to 104 and 111 to 114 varies in resistance depending on thetarget magnetic field. The resistances of the MR elements 101, 102, 113and 114 vary in phase with each other. The resistances of the MRelements 103, 104, 111 and 112 vary 180° out of phase with theresistances of the MR elements 101, 102, 113 and 114. The first outputport E1 outputs a first detection signal corresponding to the potentialat the connection point between the first row of magnetic detectionelements and the second row of magnetic detection elements, i.e., theconnection point between the MR element 102 and the MR element 111, inthe first half-bridge circuit. The second output port E2 outputs asecond detection signal corresponding to the potential at the connectionpoint between the first row of magnetic detection elements and thesecond row of magnetic detection elements, i.e., the connection pointbetween the MR element 104 and the MR element 113, in the secondhalf-bridge circuit. The first and second detection signals varydepending on the target magnetic field. The second detection signal is180° out of phase with the first detection signal.

The second magnetic sensor 6B has the same configuration as the firstmagnetic sensor 6A. However, the MR elements 101 to 104 and 111 to 114and the magnetic field generation units 201 to 208 and 211 to 218 of thesecond magnetic sensor 6B are placed in such an orientation that the MRelements 101 to 104 and 111 to 114 and the magnetic field generationunits 201 to 208 and 211 to 218 of the first magnetic sensor 6A arerotated counterclockwise by 90° in the XY plane. Thus, the magnetizationpinned layers 13 of the MR elements 101 to 104 and 111 to 114 of thesecond magnetic sensor 6B have magnetization directions that are rotatedcounterclockwise by 90° in the XY plane from the magnetizationdirections of the magnetization pinned layers 13 of the MR elements 101to 104 and 111 to 114 of the first magnetic sensor 6A. Likewise, thefirst ferromagnetic material sections 220 of the magnetic fieldgeneration units 201 to 208 and 211 to 218 of the second magnetic sensor6B have magnetization directions that are rotated counterclockwise by90° in the XY plane from the magnetization directions of the firstferromagnetic material sections 220 of the magnetic field generationunits 201 to 208 and 211 to 218 of the first magnetic sensor 6A.Therefore, the bias magnetic fields to be applied to the MR elements 101to 104 and 111 to 118 of the second magnetic sensor 6B are in directionsthat are rotated counterclockwise by 90° in the XY plane from thedirections of the bias magnetic fields to be applied to the MR elements101 to 104 and 111 to 118 of the first magnetic sensor 6A.

In the first magnetic sensor 6A, the potential at the connection pointbetween the MR elements 102 and 111 in the first magnetic sensor 6A andthe potential at the connection point between the MR elements 104 and113 in the first magnetic sensor 6A vary depending on the strength ofthe X-directional component of the target magnetic field. The first andsecond detection signals of the first magnetic sensor 6A represent thestrength of the X-directional component of the target magnetic field.

In the second magnetic sensor 6B, the potential at the connection pointbetween the MR elements 102 and 111 in the second magnetic sensor 6B andthe potential at the connection point between the MR elements 104 and113 in the second magnetic sensor 6B vary depending on the strength ofthe Y-directional component of the target magnetic field. The first andsecond detection signals of the second magnetic sensor 6B represent thestrength of the Y-directional component of the target magnetic field.

The magnetic sensor system of the seventh embodiment further includestwo differential circuits 7A and 7B and a computing unit 7C. Thedifferential circuits 7A and 7B and the computing unit 7C each have twoinputs and an output. The two inputs of the differential circuit 7A arerespectively connected to the first and second output ports E1 and E2 ofthe first magnetic sensor 6A. The two inputs of the differential circuit7B are respectively connected to the first and second output ports E1and E2 of the second magnetic sensor 6B. The two inputs of the computingunit 7C are connected to the respective outputs of the differentialcircuits 7A and 7B.

The differential circuit 7A outputs a first computation signal generatedby a computation that includes determining the difference between thefirst detection signal and the second detection signal of the firstmagnetic sensor 6A. The differential circuit 7B outputs a secondcomputation signal generated by a computation that includes determiningthe difference between the first detection signal and the seconddetection signal of the second magnetic sensor 6B. On the basis of thefirst and second computation signals, the computing unit 7C computes anoutput signal representing the direction and/or magnitude of the targetmagnetic field. The differential circuits 7A and 7B and the computingunit 7C can be implemented by a single microcomputer, for example.

The first and second magnetic sensors 6A and 6B may each include a biasmagnetic field generator formed of the magnetic field generator 9according to the third embodiment, instead of the bias magnetic fieldgenerator of the seventh embodiment. The remainder of configuration,function and effects of the seventh embodiment are similar to those ofthe third or sixth embodiment.

The present invention is not limited to the foregoing embodiments, andvarious modifications may be made thereto. For example, as far as therequirements of the appended claims are met, the number, shape andarrangement of the plurality of MR elements and the plurality ofmagnetic field generation units can be freely chosen without beinglimited to the examples illustrated in the foregoing embodiments.

Further, the MR element 10 may be formed by stacking the underlayer 11,the free layer 15, the nonmagnetic layer 14, the magnetization pinnedlayer 13, the antiferromagnetic layer 12, and the protective layer 16 inthis order from the lower electrode 40 side.

Obviously, many modifications and variations of the present inventionare possible in the light of the above teachings. Thus, it is to beunderstood that, within the scope of the appended claims and equivalentsthereof, the invention may be practiced in other than the foregoing mostpreferable embodiments.

What is claimed is:
 1. A plurality of magnetic field generators eachcomprising a first ferromagnetic material section and a firstantiferromagnetic material section, wherein the first antiferromagneticmaterial section is in contact with and exchange-coupled to the firstferromagnetic material section, the first ferromagnetic material sectionhas an overall magnetization, and the plurality of magnetic fieldgenerators includes first and second magnetic field generatorsconfigured so that the overall magnetization of the first ferromagneticmaterial section of the first magnetic field generator is in a differentdirection from the overall magnetization of the first ferromagneticmaterial section of the second magnetic field generator.
 2. Theplurality of magnetic field generators according to claim 1, wherein thefirst magnetic field generator is associated with a first magneticdetection element, and the second magnetic field generator is associatedwith a second magnetic detection element.
 3. The plurality of magneticfield generators according to claim 1, wherein the first ferromagneticmaterial section includes a plurality of constituent layers stacked oneach other, and the plurality of constituent layers include a firstferromagnetic layer in contact with the first antiferromagnetic materialsection.
 4. The plurality of magnetic field generators according toclaim 3, wherein the plurality of constituent layers further include asecond ferromagnetic layer which is located farther from the firstantiferromagnetic material section than the first ferromagnetic layer.5. The plurality of magnetic field generators according to claim 4,wherein the plurality of constituent layers further include anonmagnetic layer interposed between the first ferromagnetic layer andthe second ferromagnetic layer.
 6. The plurality of magnetic fieldgenerators according to claim 5, wherein the first ferromagnetic layerand the second ferromagnetic layer are ferromagneticallyexchange-coupled to each other via the nonmagnetic layer, and each ofthe first ferromagnetic layer and the second ferromagnetic layer has amagnetization in the same direction as the overall magnetization of thefirst ferromagnetic material section.
 7. The plurality of magnetic fieldgenerators according to claim 5, wherein the first ferromagnetic layerand the second ferromagnetic layer are antiferromagneticallyexchange-coupled to each other via the nonmagnetic layer, and the secondferromagnetic layer has a magnetization in the same direction as theoverall magnetization of the first ferromagnetic material section. 8.The plurality of magnetic field generators according to claim 1, whereinthe first ferromagnetic material section has a first surface and asecond surface opposite to each other, the first antiferromagneticmaterial section is in contact with the first surface of the firstferromagnetic material section, and each of the plurality of magneticfield generators further includes a second antiferromagnetic materialsection in contact with the second surface of the first ferromagneticmaterial section and exchange-coupled to the first ferromagneticmaterial section.
 9. The plurality of magnetic field generatorsaccording to claim 8, wherein the first and second antiferromagneticmaterial sections have different blocking temperatures.
 10. Theplurality of magnetic field generators according to claim 1, wherein thefirst antiferromagnetic material section has a first surface and asecond surface opposite to each other, the first ferromagnetic materialsection is in contact with the first surface of the firstantiferromagnetic material section, each of the plurality of magneticfield generators further includes a second ferromagnetic materialsection in contact with the second surface of the firstantiferromagnetic material section and exchange-coupled to the firstantiferromagnetic material section, and the second ferromagneticmaterial section has an overall magnetization.
 11. A magnetic sensorsystem comprising a scale and a magnetic sensor arranged in a variablerelative positional relationship with each other, the magnetic sensorsystem being configured to detect a physical quantity associated withthe relative positional relationship between the scale and the magneticsensor, wherein the scale includes a plurality of magnetic fieldgenerators, each of the plurality of magnetic field generators includesa first ferromagnetic material section and a first antiferromagneticmaterial section, the first antiferromagnetic material section is incontact with and exchange-coupled to the first ferromagnetic materialsection, the first ferromagnetic material section has an overallmagnetization, and the plurality of magnetic field generators includesfirst and second magnetic field generators configured so that theoverall magnetization of the first ferromagnetic material section of thefirst magnetic field generator is in a different direction from theoverall magnetization of the first ferromagnetic material section of thesecond magnetic field generator.
 12. The magnetic sensor systemaccording to claim 11, wherein the plurality of magnetic fieldgenerators are arranged in a row.
 13. The magnetic sensor systemaccording to claim 12, wherein the direction of the overallmagnetization of the first ferromagnetic material section of the firstmagnetic field generator and the direction of the overall magnetizationof the first ferromagnetic material section of the second magnetic fieldgenerator intersect a direction in which the row of the plurality ofmagnetic field generators extends and are opposite to each other. 14.The magnetic sensor system according to claim 11, wherein the pluralityof magnetic field generators are annularly arranged to form anaggregation having an outer periphery and an inner periphery.
 15. Themagnetic sensor system according to claim 14, wherein the overallmagnetization of the first ferromagnetic material section of the firstmagnetic field generator is in a direction from the outer periphery tothe inner periphery, and the overall magnetization of the firstferromagnetic material section of the second magnetic field generator isin a direction from the inner periphery to the outer periphery.
 16. Amagnetic sensor comprising: a plurality of magnetic detection elements;and a plurality of magnetic field generators, wherein each of theplurality of magnetic field generators includes a first ferromagneticmaterial section and a first antiferromagnetic material section, thefirst antiferromagnetic material section is in contact with andexchange-coupled to the first ferromagnetic material section, the firstferromagnetic material section has an overall magnetization, theplurality of magnetic field generators includes first and secondmagnetic field generators configured so that the overall magnetizationof the first ferromagnetic material section of the first magnetic fieldgenerator is in a different direction from the overall magnetization ofthe first ferromagnetic material section of the second magnetic fieldgenerator, and each of the plurality of magnetic detection elements isconfigured to be subjected to a magnetic field that results from theoverall magnetization of the first ferromagnetic material section of atleast one of the plurality of magnetic field generators.
 17. Themagnetic sensor according to claim 16, wherein each of the plurality ofmagnetic detection elements is a magnetoresistance element.
 18. Themagnetic sensor according to claim 17, wherein the magnetoresistanceelement includes: a magnetization pinned layer having a magnetizationpinned in a certain direction; a free layer having a magnetization thatvaries depending on the magnetic field to be detected; and a nonmagneticlayer located between the magnetization pinned layer and the free layer.19. The magnetic sensor according to claim 18, wherein the overallmagnetization of the first ferromagnetic material section of any one ofthe plurality of magnetic field generators is in a directionintersecting the direction of the magnetization of the magnetizationpinned layer of a specific magnetoresistance element that is to besubjected to a magnetic field resulting from the overall magnetizationof the first ferromagnetic material section of the one of the pluralityof magnetic field generators.
 20. The magnetic sensor according to claim16, wherein the plurality of magnetic detection elements includes afirst magnetic detection element and a second magnetic detection elementconnected in series, the first magnetic detection element is configuredto be subjected to a magnetic field that results from the overallmagnetization of the first ferromagnetic material section of the firstmagnetic field generator, and the second magnetic detection element isconfigured to be subjected to a magnetic field that results from theoverall magnetization of the first ferromagnetic material section of thesecond magnetic field generator.
 21. A magnetic sensor comprising: aplurality of magnetic detection elements; and a plurality of magneticfield generators, wherein each of the plurality of magnetic fieldgenerators includes a first ferromagnetic material section and a firstantiferromagnetic material section, the first antiferromagnetic materialsection is in contact with and exchange-coupled to the firstferromagnetic material section, the first ferromagnetic material sectionhas an overall magnetization, the plurality of magnetic detectionelements includes a first magnetic detection element and a secondmagnetic detection element connected in series, the plurality ofmagnetic field generators includes a first to a fourth magnetic fieldgenerator, the first magnetic detection element is configured to besubjected to a magnetic field that results from the overallmagnetization of the first ferromagnetic material section of the firstmagnetic field generator and the overall magnetization of the firstferromagnetic material section of the second magnetic field generator,the second magnetic detection element is configured to be subjected to amagnetic field that results from the overall magnetization of the firstferromagnetic material section of the third magnetic field generator andthe overall magnetization of the first ferromagnetic material section ofthe fourth magnetic field generator, the first and third magnetic fieldgenerators are configured so that the overall magnetization of the firstferromagnetic material section of the first magnetic field generator isin a different direction from the overall magnetization of the firstferromagnetic material section of the third magnetic field generator,and the second and fourth magnetic field generators are configured sothat the overall magnetization of the first ferromagnetic materialsection of the second magnetic field generator is in a differentdirection from the overall magnetization of the first ferromagneticmaterial section of the fourth magnetic field generator.